mqtest4.c (e100f6a2fc03d6f8c268f237f595533ea8044810) mqtest4.c (e8395c4843c0668d8402bb991cbc1eac09c21315)
1/* $FreeBSD$ */
2
3#include <sys/types.h>
4#include <sys/event.h>
5#include <sys/select.h>
6#include <sys/wait.h>
7#include <err.h>
8#include <fcntl.h>
9#include <mqueue.h>
10#include <signal.h>
11#include <stdio.h>
12#include <stdlib.h>
13#include <unistd.h>
14
1/* $FreeBSD$ */
2
3#include <sys/types.h>
4#include <sys/event.h>
5#include <sys/select.h>
6#include <sys/wait.h>
7#include <err.h>
8#include <fcntl.h>
9#include <mqueue.h>
10#include <signal.h>
11#include <stdio.h>
12#include <stdlib.h>
13#include <unistd.h>
14
15#include "freebsd_test_suite/macros.h"
16
15#define MQNAME "/mytstqueue4"
16#define LOOPS 1000
17#define PRIO 10
18
19static void
20sighandler(int sig __unused)
21{
22 write(1, "timeout\n", 8);

--- 4 unchanged lines hidden (view full) ---

27main(void)
28{
29 struct kevent kev;
30 struct mq_attr attr;
31 mqd_t mq;
32 int kq, status;
33 pid_t pid;
34
17#define MQNAME "/mytstqueue4"
18#define LOOPS 1000
19#define PRIO 10
20
21static void
22sighandler(int sig __unused)
23{
24 write(1, "timeout\n", 8);

--- 4 unchanged lines hidden (view full) ---

29main(void)
30{
31 struct kevent kev;
32 struct mq_attr attr;
33 mqd_t mq;
34 int kq, status;
35 pid_t pid;
36
37 PLAIN_REQUIRE_KERNEL_MODULE("mqueuefs", 0);
38
35 mq_unlink(MQNAME);
36
37 attr.mq_maxmsg = 5;
38 attr.mq_msgsize = 128;
39 mq = mq_open(MQNAME, O_CREAT | O_RDWR | O_EXCL, 0666, &attr);
40 if (mq == (mqd_t) -1)
41 err(1, "mq_open()");
42 status = mq_getattr(mq, &attr);

--- 74 unchanged lines hidden ---
39 mq_unlink(MQNAME);
40
41 attr.mq_maxmsg = 5;
42 attr.mq_msgsize = 128;
43 mq = mq_open(MQNAME, O_CREAT | O_RDWR | O_EXCL, 0666, &attr);
44 if (mq == (mqd_t) -1)
45 err(1, "mq_open()");
46 status = mq_getattr(mq, &attr);

--- 74 unchanged lines hidden ---