static void readclock(int type, struct tm *t, int flags) { int r; message m; endpoint_t ep; r = minix_rs_lookup("readclock.drv", &ep); if (r != 0) { if (!quiet) errmsg("Couldn't locate readclock.drv\n"); exit(1); } m.RTCDEV_TM = (char *) t; m.RTCDEV_FLAGS = flags; r = _syscall(ep, type, &m); if (r != RTCDEV_REPLY || m.RTCDEV_STATUS != 0) { if (!quiet) errmsg("Call to readclock.drv failed\n"); exit(1); } }
static void do_scheduler(config_t *cpe, struct rs_start *rs_start) { endpoint_t scheduler_ep; int r; /* Process a scheduler value */ if (cpe->next != NULL) { fatal("do_scheduler: just one scheduler value expected at %s:%d", cpe->file, cpe->line); } if (cpe->flags & CFG_SUBLIST) { fatal("do_scheduler: unexpected sublist at %s:%d", cpe->file, cpe->line); } if (cpe->flags & CFG_STRING) { fatal("do_scheduler: unexpected string at %s:%d", cpe->file, cpe->line); } if(!strcmp(cpe->word, "KERNEL")) { scheduler_ep = KERNEL; } else { if((r = minix_rs_lookup(cpe->word, &scheduler_ep))) { fatal("do_scheduler: unknown scheduler %s at %s:%d", cpe->word, cpe->file, cpe->line); } } rs_start->rss_scheduler= scheduler_ep; }
static void do_sigmgr(config_t *cpe, struct rs_start *rs_start) { endpoint_t sigmgr_ep; int r; /* Process a signal manager value */ if (cpe->next != NULL) { fatal("do_sigmgr: just one sigmgr value expected at %s:%d", cpe->file, cpe->line); } if (cpe->flags & CFG_SUBLIST) { fatal("do_sigmgr: unexpected sublist at %s:%d", cpe->file, cpe->line); } if (cpe->flags & CFG_STRING) { fatal("do_sigmgr: unexpected string at %s:%d", cpe->file, cpe->line); } if(!strcmp(cpe->word, "SELF")) { sigmgr_ep = SELF; } else { if((r = minix_rs_lookup(cpe->word, &sigmgr_ep))) { fatal("do_sigmgr: unknown sigmgr %s at %s:%d", cpe->word, cpe->file, cpe->line); } } rs_start->rss_sigmgr= sigmgr_ep; }
static int get_ipc_endpt(endpoint_t *pt) { return minix_rs_lookup("ipc", pt); }