rewrite posix semaphore and mqueue implementation.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1103 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
bernard.xiong@gmail.com
2010-11-24 00:04:16 +00:00
parent 558023a020
commit 1b014359b0
6 changed files with 524 additions and 67 deletions
+20 -1
View File
@@ -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. */