porting pthread to ARMCC compiler;

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1286 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
bernard.xiong
2011-02-21 08:26:35 +00:00
parent 397efc1252
commit 54228a0518
15 changed files with 356 additions and 163 deletions

View File

@@ -15,8 +15,7 @@
#define __PTHREAD_H__
#include <rtthread.h>
#include <errno.h>
#include <sys/types.h>
#include <posix_types.h>
#define PTHREAD_KEY_MAX 8
@@ -254,5 +253,20 @@ struct sigevent {
pthread_attr_t *sigev_notify_attributes; /* Notification Attributes */
};
/* posix clock and timer */
#define MILLISECOND_PER_SECOND 1000UL
#define MICROSECOND_PER_SECOND 1000000UL
#define NANOSECOND_PER_SECOND 1000000000UL
#define MILLISECOND_PER_TICK (MILLISECOND_PER_SECOND / RT_TICK_PER_SECOND)
#define MICROSECOND_PER_TICK (MICROSECOND_PER_SECOND / RT_TICK_PER_SECOND)
#define NANOSECOND_PER_TICK (NANOSECOND_PER_SECOND / RT_TICK_PER_SECOND)
#define CLOCK_REALTIME 0
int clock_getres (clockid_t clockid, struct timespec *res);
int clock_gettime (clockid_t clockid, struct timespec *tp);
int clock_settime (clockid_t clockid, const struct timespec *tp);
#endif