Zephyr Project API 3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
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_MESSAGE_PASSING_H_
8#define ZEPHYR_INCLUDE_POSIX_MESSAGE_PASSING_H_
9
10#include <zephyr/kernel.h>
11#include <zephyr/posix/time.h>
12#include <zephyr/posix/fcntl.h>
13#include <zephyr/posix/signal.h>
15#include "posix_types.h"
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21typedef void *mqd_t;
22
23struct mq_attr {
27 long mq_curmsgs; /* Number of messages currently queued. */
28};
29
30mqd_t mq_open(const char *name, int oflags, ...);
31int mq_close(mqd_t mqdes);
32int mq_unlink(const char *name);
33int mq_getattr(mqd_t mqdes, struct mq_attr *mqstat);
34int mq_receive(mqd_t mqdes, char *msg_ptr, size_t msg_len,
35 unsigned int *msg_prio);
36int mq_send(mqd_t mqdes, const char *msg_ptr, size_t msg_len,
37 unsigned int msg_prio);
38int mq_setattr(mqd_t mqdes, const struct mq_attr *mqstat,
39 struct mq_attr *omqstat);
40int mq_timedreceive(mqd_t mqdes, char *msg_ptr, size_t msg_len,
41 unsigned int *msg_prio, const struct timespec *abstime);
42int mq_timedsend(mqd_t mqdes, const char *msg_ptr, size_t msg_len,
43 unsigned int msg_prio, const struct timespec *abstime);
44int mq_notify(mqd_t mqdes, const struct sigevent *notification);
45
46#ifdef __cplusplus
47}
48#endif
49
50#endif /* ZEPHYR_INCLUDE_POSIX_MESSAGE_PASSING_H_ */
Public kernel APIs.
int mq_close(mqd_t mqdes)
int mq_getattr(mqd_t mqdes, struct mq_attr *mqstat)
int mq_notify(mqd_t mqdes, const struct sigevent *notification)
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:21
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:23
long mq_curmsgs
Definition mqueue.h:27
long mq_flags
Definition mqueue.h:24
long mq_maxmsg
Definition mqueue.h:25
long mq_msgsize
Definition mqueue.h:26
Definition signal.h:87
Definition _timespec.h:22