2012-07-18 18:53:20 +02:00
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <minix/ipc.h>
|
|
|
|
|
2012-06-10 19:50:17 +02:00
|
|
|
/* Minix kernel info, IPC functions pointers */
|
2012-07-18 18:53:20 +02:00
|
|
|
struct minix_kerninfo *_minix_kerninfo = NULL;
|
|
|
|
|
|
|
|
void __minix_init(void) __attribute__((__constructor__, __used__));
|
|
|
|
|
2012-06-10 19:50:17 +02:00
|
|
|
struct minix_ipcvecs _minix_ipcvecs = {
|
2013-11-01 13:34:14 +01:00
|
|
|
.sendrec = _ipc_sendrec_intr,
|
|
|
|
.send = _ipc_send_intr,
|
|
|
|
.notify = _ipc_notify_intr,
|
|
|
|
.senda = _ipc_senda_intr,
|
|
|
|
.sendnb = _ipc_sendnb_intr,
|
|
|
|
.receive = _ipc_receive_intr,
|
|
|
|
.do_kernel_call = _do_kernel_call_intr,
|
2012-06-10 19:50:17 +02:00
|
|
|
};
|
|
|
|
|
2012-07-18 18:53:20 +02:00
|
|
|
void __minix_init(void)
|
|
|
|
{
|
2013-11-01 13:34:14 +01:00
|
|
|
if((get_minix_kerninfo(&_minix_kerninfo) != 0) ||
|
|
|
|
(_minix_kerninfo->kerninfo_magic != KERNINFO_MAGIC))
|
|
|
|
{
|
2012-07-18 18:53:20 +02:00
|
|
|
_minix_kerninfo = NULL;
|
2013-11-01 13:34:14 +01:00
|
|
|
}
|
|
|
|
else if((_minix_kerninfo->ki_flags & MINIX_KIF_IPCVECS) &&
|
|
|
|
(_minix_kerninfo->minix_ipcvecs != NULL))
|
|
|
|
{
|
2012-06-10 19:50:17 +02:00
|
|
|
_minix_ipcvecs = *_minix_kerninfo->minix_ipcvecs;
|
2013-11-01 13:34:14 +01:00
|
|
|
}
|
2012-07-18 18:53:20 +02:00
|
|
|
}
|
|
|
|
|