Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
mqueue.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018 Intel Corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_POSIX_MQUEUE_H_
8#define ZEPHYR_INCLUDE_POSIX_MQUEUE_H_
9
10#include <kernel.h>
11#include <posix/time.h>
12#include <fcntl.h>
13#include "posix_types.h"
14#include "sys/stat.h"
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20typedef void *mqd_t;
21
22typedef struct mq_attr {
26 long mq_curmsgs; /* Number of messages currently queued. */
28
29mqd_t mq_open(const char *name, int oflags, ...);
30int mq_close(mqd_t mqdes);
31int mq_unlink(const char *name);
32int mq_getattr(mqd_t mqdes, struct mq_attr *mqstat);
33int mq_receive(mqd_t mqdes, char *msg_ptr, size_t msg_len,
34 unsigned int *msg_prio);
35int mq_send(mqd_t mqdes, const char *msg_ptr, size_t msg_len,
36 unsigned int msg_prio);
37int mq_setattr(mqd_t mqdes, const struct mq_attr *mqstat,
38 struct mq_attr *omqstat);
39int mq_timedreceive(mqd_t mqdes, char *msg_ptr, size_t msg_len,
40 unsigned int *msg_prio, const struct timespec *abstime);
41int mq_timedsend(mqd_t mqdes, const char *msg_ptr, size_t msg_len,
42 unsigned int msg_prio, const struct timespec *abstime);
43
44#ifdef __cplusplus
45}
46#endif
47
48#endif /* ZEPHYR_INCLUDE_POSIX_MQUEUE_H_ */
int mq_close(mqd_t mqdes)
struct mq_attr mq_attr
int mq_getattr(mqd_t mqdes, struct mq_attr *mqstat)
mqd_t mq_open(const char *name, int oflags,...)
int mq_setattr(mqd_t mqdes, const struct mq_attr *mqstat, struct mq_attr *omqstat)
void * mqd_t
Definition: mqueue.h:20
int mq_timedreceive(mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned int *msg_prio, const struct timespec *abstime)
int mq_timedsend(mqd_t mqdes, const char *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec *abstime)
int mq_unlink(const char *name)
int mq_receive(mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned int *msg_prio)
int mq_send(mqd_t mqdes, const char *msg_ptr, size_t msg_len, unsigned int msg_prio)
Definition: mqueue.h:22
long mq_curmsgs
Definition: mqueue.h:26
long mq_flags
Definition: mqueue.h:23
long mq_maxmsg
Definition: mqueue.h:24
long mq_msgsize
Definition: mqueue.h:25
Definition: _timespec.h:22