soft real-time scheduling

Ankit Jain ankitjain1580@yahoo.com
Sun Sep 26 14:08:00 GMT 2004


hi

 /* soft realtime scheduling variable */
   struct sched_param *p;


 /* set soft real-time scheduling */
   sched_getparam(0,p);
   p->sched_priority = 50;
   if (sched_setscheduler(0,SCHED_FIFO,p))
     fprintf(stderr,"Could not change scheduler
settings\n");

if anyone knows about this then i need some help

p is a pointer to the structure sched_param which is
defined in sched.h

this structure has a variable __sched_priority where i
have to set the priority of the process

p->sched_priority =50 this line gives a segmentation
fault. 
how t oaccess this variable (__sched_priority) of the
header file

thanks

ankit

________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html



More information about the Gcc-help mailing list