Skip to content
Permalink
Browse files

posix: mqueue.h: Move O_CREAT and friends to fcntl.h

That's the header which is supposed to define them, there was even
FIXME on that in mqueue.h.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
  • Loading branch information...
pfalcon authored and galak committed Jun 5, 2019
1 parent 15a9709 commit 1347bf9b48770d85aaa4847bb25557791f7a4d12
Showing with 3 additions and 15 deletions.
  1. +1 −15 include/posix/mqueue.h
  2. +2 −0 lib/libc/minimal/include/fcntl.h
@@ -9,6 +9,7 @@

#include <kernel.h>
#include <posix/time.h>
#include <fcntl.h>
#include "posix_types.h"
#include "sys/stat.h"

@@ -25,21 +26,6 @@ typedef struct mq_attr {
long mq_curmsgs; /* Number of messages currently queued. */
} mq_attr;

/* FIXME: below should be defined into fcntl.h file.
* This is temporarily put here.
*/

#ifndef _SYS_FCNTL_H_
#define O_CREAT_POS 9
#define O_CREAT (1 << O_CREAT_POS)

#define O_EXCL_POS 11
#define O_EXCL (1 << O_EXCL_POS)

#define O_NONBLOCK_POS 14
#define O_NONBLOCK (1 << O_NONBLOCK_POS)
#endif /* _SYS_FCNTL_H_ */

mqd_t mq_open(const char *name, int oflags, ...);
int mq_close(mqd_t mqdes);
int mq_unlink(const char *name);
@@ -7,6 +7,8 @@
#ifndef ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_FCNTL_H_
#define ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_FCNTL_H_

#define O_CREAT 0x0200
#define O_EXCL 0x0800
#define O_NONBLOCK 0x4000

#define F_DUPFD 0

0 comments on commit 1347bf9

Please sign in to comment.
You can’t perform that action at this time.