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:
@@ -17,8 +17,6 @@
|
||||
|
||||
#include "tos_k.h"
|
||||
|
||||
#if TOS_CFG_COMPLETION_EN > 0u
|
||||
|
||||
__API__ k_err_t tos_completion_create(k_completion_t *completion)
|
||||
{
|
||||
TOS_PTR_SANITY_CHECK(completion);
|
||||
@@ -57,6 +55,7 @@ __API__ k_err_t tos_completion_pend_timed(k_completion_t *completion, k_tick_t t
|
||||
{
|
||||
TOS_CPU_CPSR_ALLOC();
|
||||
|
||||
TOS_IN_IRQ_CHECK();
|
||||
TOS_PTR_SANITY_CHECK(completion);
|
||||
TOS_OBJ_VERIFY(completion, KNL_OBJ_TYPE_COMPLETION);
|
||||
|
||||
@@ -72,11 +71,6 @@ __API__ k_err_t tos_completion_pend_timed(k_completion_t *completion, k_tick_t t
|
||||
return K_ERR_PEND_NOWAIT;
|
||||
}
|
||||
|
||||
if (knl_is_inirq()) {
|
||||
TOS_CPU_INT_ENABLE();
|
||||
return K_ERR_PEND_IN_IRQ;
|
||||
}
|
||||
|
||||
if (knl_is_sched_locked()) {
|
||||
TOS_CPU_INT_ENABLE();
|
||||
return K_ERR_PEND_SCHED_LOCKED;
|
||||
@@ -163,5 +157,3 @@ __API__ int tos_completion_is_done(k_completion_t *completion)
|
||||
return is_done;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user