etc/services - sync with NetBSD-8
[minix.git] / minix / lib / libc / sys / init.c
bloba7a091b91820daecd5e4a12b1d09f1dd613dd9ca
2 #include <stdio.h>
3 #include <minix/ipc.h>
5 /* Minix kernel info, IPC functions pointers */
6 struct minix_kerninfo *_minix_kerninfo = NULL;
8 void __minix_init(void) __attribute__((__constructor__, __used__));
10 struct minix_ipcvecs _minix_ipcvecs = {
11 .sendrec = _ipc_sendrec_intr,
12 .send = _ipc_send_intr,
13 .notify = _ipc_notify_intr,
14 .senda = _ipc_senda_intr,
15 .sendnb = _ipc_sendnb_intr,
16 .receive = _ipc_receive_intr,
17 .do_kernel_call = _do_kernel_call_intr,
20 void __minix_init(void)
22 if((ipc_minix_kerninfo(&_minix_kerninfo) != 0) ||
23 (_minix_kerninfo->kerninfo_magic != KERNINFO_MAGIC))
25 _minix_kerninfo = NULL;
27 else if((_minix_kerninfo->ki_flags & MINIX_KIF_IPCVECS) &&
28 (_minix_kerninfo->minix_ipcvecs != NULL))
30 _minix_ipcvecs = *_minix_kerninfo->minix_ipcvecs;