make vfs & filesystems use failable copying
[minix3.git] / lib / libsys / sched_stop.c
blobf4b3d5f769d446195d218c05d0e62fdcaa682a51
1 #include "syslib.h"
2 #include <assert.h>
3 #include <string.h>
5 /*===========================================================================*
6 * sched_stop *
7 *===========================================================================*/
8 int sched_stop(endpoint_t scheduler_e, endpoint_t schedulee_e)
10 int rv;
11 message m;
13 /* If the kernel is the scheduler, it will implicitly stop scheduling
14 * once another process takes over or the process terminates */
15 if (scheduler_e == KERNEL || scheduler_e == NONE)
16 return(OK);
18 /* User-scheduled, perform the call */
19 assert(_ENDPOINT_P(scheduler_e) >= 0);
20 assert(_ENDPOINT_P(schedulee_e) >= 0);
22 memset(&m, 0, sizeof(m));
23 m.SCHEDULING_ENDPOINT = schedulee_e;
24 if ((rv = _taskcall(scheduler_e, SCHEDULING_STOP, &m))) {
25 return rv;
28 return (OK);