Drop main() prototype. Syncs with NetBSD-8
[minix.git] / minix / lib / libsys / sched_stop.c
blobd6ad73cdc5b4c44b83d0414044df8332f3662c9e
1 #include "syslib.h"
2 #include <assert.h>
3 #include <string.h>
4 #include <minix/sched.h>
6 /*===========================================================================*
7 * sched_stop *
8 *===========================================================================*/
9 int sched_stop(endpoint_t scheduler_e, endpoint_t schedulee_e)
11 int rv;
12 message m;
14 /* If the kernel is the scheduler, it will implicitly stop scheduling
15 * once another process takes over or the process terminates */
16 if (scheduler_e == KERNEL || scheduler_e == NONE)
17 return(OK);
19 /* User-scheduled, perform the call */
20 assert(_ENDPOINT_P(scheduler_e) >= 0);
21 assert(_ENDPOINT_P(schedulee_e) >= 0);
23 memset(&m, 0, sizeof(m));
24 m.m_lsys_sched_scheduling_stop.endpoint = schedulee_e;
25 if ((rv = _taskcall(scheduler_e, SCHEDULING_STOP, &m))) {
26 return rv;
29 return (OK);