summaryrefslogtreecommitdiff
path: root/components/libc/pthreads/mqueue.h
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2021-10-17 17:19:12 -0400
committerMeco Man <[email protected]>2021-10-17 17:19:12 -0400
commitb513d37cf2fc33c2dd20021316533feaac0bef23 (patch)
treef14e24d145a40620dbb8fd5a5d807b972ec4a1d5 /components/libc/pthreads/mqueue.h
parent9fe546b0d86b17c64e57447913c8a9f3a9c40534 (diff)
[libc][posix] create 'posix' folder and move related files into it
Diffstat (limited to 'components/libc/pthreads/mqueue.h')
-rw-r--r--components/libc/pthreads/mqueue.h59
1 files changed, 0 insertions, 59 deletions
diff --git a/components/libc/pthreads/mqueue.h b/components/libc/pthreads/mqueue.h
deleted file mode 100644
index 5152bfad29..0000000000
--- a/components/libc/pthreads/mqueue.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2006-2021, RT-Thread Development Team
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Change Logs:
- * Date Author Notes
- */
-
-#ifndef __MQUEUE_H__
-#define __MQUEUE_H__
-
-#include <rtthread.h>
-#include <pthread.h>
-
-struct mqdes
-{
- /* reference count and unlinked */
- rt_uint16_t refcount;
- rt_uint16_t unlinked;
-
- /* RT-Thread message queue */
- rt_mq_t mq;
- /* next posix mqueue */
- struct mqdes* next;
-};
-typedef struct mqdes* mqd_t;
-
-struct mq_attr
-{
- long mq_flags; /* Message queue flags. */
- long mq_maxmsg; /* Maximum number of messages. */
- long mq_msgsize; /* Maximum message size. */
- long mq_curmsgs; /* Number of messages currently queued. */
-};
-
-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 oflag, ...);
-ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned *msg_prio);
-int mq_send(mqd_t mqdes, const char *msg_ptr, size_t msg_len, unsigned msg_prio);
-int mq_setattr(mqd_t mqdes,
- const struct mq_attr *mqstat,
- struct mq_attr *omqstat);
-ssize_t mq_timedreceive(mqd_t mqdes,
- char *msg_ptr,
- size_t msg_len,
- unsigned *msg_prio,
- const struct timespec *abs_timeout);
-int mq_timedsend(mqd_t mqdes,
- const char *msg_ptr,
- size_t msg_len,
- unsigned msg_prio,
- const struct timespec *abs_timeout);
-
-int mq_unlink(const char *name);
-
-#endif