summaryrefslogtreecommitdiff
path: root/components/pthreads/mqueue.h
diff options
context:
space:
mode:
Diffstat (limited to 'components/pthreads/mqueue.h')
-rw-r--r--components/pthreads/mqueue.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/components/pthreads/mqueue.h b/components/pthreads/mqueue.h
index 80df241d85..fb99e58068 100644
--- a/components/pthreads/mqueue.h
+++ b/components/pthreads/mqueue.h
@@ -7,7 +7,26 @@
#include <sys/signal.h>
#include <pthread.h>
-typedef rt_mq_t mqd_t;
+struct posix_mq
+{
+ /* reference count and unlinked */
+ rt_uint16_t refcount;
+ rt_uint16_t unlinked;
+
+ /* RT-Thread message queue */
+ rt_mq_t mq;
+ /* next posix mqueue */
+ struct posix_mq* next;
+};
+typedef struct posix_mq posix_mq_t;
+
+struct mqdes
+{
+ rt_uint32_t flags;
+ posix_mq_t* mq;
+};
+typedef struct mqdes* mqd_t;
+
struct mq_attr
{
long mq_flags; /* Message queue flags. */