minix/minix/lib/libsys/sys_mq_open.c
Sanchayan Maity 63062e7e15 Add message queue support for Minix
Implement message queues support for Minix.

Pending tasks:
Blocking or non blocking for send receive?
Sort by priority and time?
Test codes?
Bug fixes?
2016-03-07 17:41:07 +05:30

15 lines
278 B
C

# include "syslib.h"
# include <string.h>
#define MAX_PAYLOAD 32
int sys_mq_open(const char *name, int oflag)
{
message m;
m.m_lsys_krn_sys_mqueue_open.oflag = oflag;
strncpy(m.m_lsys_krn_sys_mqueue_open.name, name, MAX_PAYLOAD);
return _kernel_call(SYS_MQ_OPEN, &m);
}