pkgin_all: script to auto-install all packages
[minix.git] / lib / libsys / sched_stop.c
blobe53a2d728d61849a861d334fe5b322c8b90f421b
1 #include "syslib.h"
2 #include <assert.h>
4 /*===========================================================================*
5 * sched_stop *
6 *===========================================================================*/
7 int sched_stop(endpoint_t scheduler_e, endpoint_t schedulee_e)
9 int rv;
10 message m;
12 /* If the kernel is the scheduler, it will implicitly stop scheduling
13 * once another process takes over or the process terminates */
14 if (scheduler_e == KERNEL || scheduler_e == NONE)
15 return(OK);
17 /* User-scheduled, perform the call */
18 assert(_ENDPOINT_P(scheduler_e) >= 0);
19 assert(_ENDPOINT_P(schedulee_e) >= 0);
21 m.SCHEDULING_ENDPOINT = schedulee_e;
22 if ((rv = _taskcall(scheduler_e, SCHEDULING_STOP, &m))) {
23 return rv;
26 return (OK);