summaryrefslogtreecommitdiff
path: root/components/pthreads/mqueue.c
diff options
context:
space:
mode:
authorbernard.xiong <[email protected]>2011-02-21 08:26:35 +0000
committerbernard.xiong <[email protected]>2011-02-21 08:26:35 +0000
commit54228a051852005210ec03e079119bd350376fac (patch)
tree76823f4b270891a45ccce9e3fca87d5d5a99012d /components/pthreads/mqueue.c
parent397efc12520a07d6fe113a656ca1a7d5e9ff15de (diff)
porting pthread to ARMCC compiler;
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1286 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/pthreads/mqueue.c')
-rw-r--r--components/pthreads/mqueue.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/components/pthreads/mqueue.c b/components/pthreads/mqueue.c
index 8f084741dd..96ee76e742 100644
--- a/components/pthreads/mqueue.c
+++ b/components/pthreads/mqueue.c
@@ -1,12 +1,6 @@
#include "mqueue.h"
#include "pthread_internal.h"
-#include <stdarg.h>
-#include <errno.h>
-#ifdef __GNUC__
-#include <sys/fcntl.h>
-#endif
-
static mqd_t posix_mq_list = RT_NULL;
static struct rt_semaphore posix_mq_lock;
void posix_mq_system_init()
@@ -105,7 +99,7 @@ mqd_t mq_open(const char *name, int oflag, ...)
if (oflag & O_CREAT)
{
va_start(arg, oflag);
- mode = (mode_t) va_arg(arg, unsigned int);
+ mode = (mode_t) va_arg(arg, unsigned int); mode = mode;
attr = (struct mq_attr *) va_arg(arg, struct mq_attr *);
va_end(arg);
@@ -221,7 +215,7 @@ ssize_t mq_timedreceive(mqd_t mqdes, char *msg_ptr, size_t msg_len,
return -1;
}
- tick = libc_time_to_tick(abs_timeout);
+ tick = clock_time_to_tick(abs_timeout);
result = rt_mq_recv(mqdes->mq, msg_ptr, msg_len, tick);
if (result == RT_EOK) return msg_len;