summaryrefslogtreecommitdiff
path: root/components/pthreads/mqueue.h
diff options
context:
space:
mode:
author[email protected] <[email protected]>2010-11-24 00:04:16 +0000
committer[email protected] <[email protected]>2010-11-24 00:04:16 +0000
commit1b014359b07799cf77a3045b78b285ffbb9b12b6 (patch)
tree6433a0e1b8e843ac2ccd62fb89908957674d92a7 /components/pthreads/mqueue.h
parent558023a0201bd06626db7c445edc9e2c9b61e97e (diff)
rewrite posix semaphore and mqueue implementation.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1103 bbd45198-f89e-11dd-88c7-29a3b14d5316
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. */