Embedded Xinu Network Playground COSC3300Fall2012
Process Management API


syscall create (void *, ulong, ulong, char *, ulong,...)
syscall ready (long, bool)
syscall resched (void)
syscall sleep (int n)

Function Documentation

syscall create ( void *  procaddr,
ulong  ssize,
ulong  priority,
char *  name,
ulong  nargs,

Create a process to start running a procedure.

procaddrprocedure address
ssizestack stack size in words
priorityprocess priority
namename of the process, used for debugging
nargsnumber of arguments that follow
the new process' process id
syscall ready ( long  pid,
bool  resch 

Make a process eligible for CPU service.

pidprocess id of the process to move to the ready state
reschif TRUE, reschedule will be called
OK if the process has been added to the ready list, else SYSERR
syscall resched ( void  )

Reschedule processor to next ready process.

Upon entry, currpid gives current process id. Proctab[currpid].pstate gives correct NEXT state for current process if other than PRREADY.

OK when the process is context switched back
syscall sleep ( int  ms)

Delay the calling process n milliseconds.

msnumber of milliseconds to sleep
OK if process is sleeping, SYSERR if no clock