support posix

1. posix pthread.h: pthread, pthread_barrier, pthread_cond, pthread_mutex, , pthread_rwlock, pthread_spin, etc
2. posix semaphore.h: sem_*
3. posix mqueue.h: mq_*
4. posix time.h: timer_*
5. to support posix, add tos_barrier, tos_bitmap, tos_rwlock, tos_stopwatch, change name of k_task_t from a char * pointer to a char array.
6. sample, see examples\posix
7. project, see board\TencentOS_tiny_EVB_MX_Plus\KEIL\posix
This commit is contained in:
daishengdong
2020-02-28 00:11:28 +08:00
parent 7bfc998494
commit 40f55ec57b
84 changed files with 11704 additions and 158 deletions

View File

@@ -18,21 +18,30 @@
#ifndef _TOS_COMPILER_H_
#define _TOS_COMPILER_H_
// function with __API__ prefix, api for user
/* function with __API__ prefix, api for user */
#define __API__
// function with __KNL__ prefix, only for kernel
/* function with __KNL__ prefix, only for kernel */
#define __KNL__
// function with __HOOK__ prefix, should be implemented by user
/* function with __HOOK__ prefix, should be implemented by user */
#define __HOOK__
// function with __DEBUG__ prefix, only for debug
/* function with __DEBUG__ prefix, only for debug */
#define __DEBUG__
// function with __PORT__ is architecture depended
/* function with __PORT__ is architecture depended */
#define __PORT__
/* CPP header guards */
#ifdef __cplusplus
#define __CDECLS_BEGIN extern "C" {
#define __CDECLS_END }
#else
#define __CDECLS_BEGIN
#define __CDECLS_END
#endif
/*------------------ RealView Compiler -----------------*/
#if defined(__CC_ARM)