api: add monetary.c .. regex.c
[libc-test.git] / src / api / mqueue.c
blobcbb0401c411e5e2010438ba06df1e9864093a5f9
1 #include <mqueue.h>
2 #define T(t) (t*)0;
3 #define F(t,n) {t *y = &x.n;}
4 static void f()
6 T(mqd_t)
7 T(pthread_attr_t)
8 T(size_t)
9 T(ssize_t)
10 T(struct timespec)
11 T(struct sigevent)
13 struct mq_attr x;
14 F(long, mq_flags)
15 F(long, mq_maxmsg)
16 F(long, mq_msgsize)
17 F(long, mq_curmsgs)
19 int(*p_mq_close)(mqd_t) = mq_close;
20 int(*p_mq_getattr)(mqd_t,struct mq_attr*) = mq_getattr;
21 int(*p_mq_notify)(mqd_t,const struct sigevent*) = mq_notify;
22 mqd_t(*p_mq_open)(const char*,int,...) = mq_open;
23 ssize_t(*p_mq_receive)(mqd_t,char*,size_t,unsigned*) = mq_receive;
24 int(*p_mq_send)(mqd_t,const char*,size_t,unsigned) = mq_send;
25 int(*p_mq_setattr)(mqd_t,const struct mq_attr*restrict,struct mq_attr*restrict) = mq_setattr;
26 int(*p_mq_unlink)(const char*) = mq_unlink;
27 #include <time.h>
28 ssize_t(*p_mq_timedreceive)(mqd_t,char*restrict,size_t,unsigned*restrict,const struct timespec*restrict) = mq_timedreceive;
29 int(*p_mq_timedsend)(mqd_t,const char*,size_t,unsigned,const struct timespec*) = mq_timedsend;