/*
 * Input arg is proc ID. Make process a realtime
 * process with highest priority minus 1.
 */
	main (argc, argv)
		int 		argc;
		char		 *argv[];
{
		pcparms_t			pcparms;
		rtparms_t			*rtparmsp;
		id_t			pid, rtID;
		id_t			schedinfo();
		short			maxrtpri;
		if ((pid = atoi(argv[1])) <= 0) {
			perror ("bad pid");
			exit (1);
		}
		/* Get highest valid RT priority. */
		if ((rtID = schedinfo ("RT", &maxrtpri)) == -1) {
			perror ("schedinfo failed for RT");
			exit (2);
	}
		/* Change proc to RT, highest prio - 1, default time slice */
		pcparms.pc_cid = rtID;
		rtparmsp = (struct rtparms *) pcparms.pc_clparms;
		rtparmsp->rt_pri = maxrtpri - 1;
		rtparmsp->rt_tqnsecs = RT_TQDEF;
		if (priocntl(P_PID, pid, PC_SETPARMS, &pcparms) == -1) {
			perror ("PC_SETPARMS failed");
			exit (3);
		}
}
