Enable shared memory && add pthread support (#282)

This commit is contained in:
Xu Jun
2020-06-15 19:04:04 +08:00
committed by GitHub
parent f4d4d69736
commit d98ab63e5c
41 changed files with 3081 additions and 289 deletions

View File

@ -68,6 +68,22 @@ int os_thread_create_with_prio(korp_tid *p_tid, thread_start_routine_t start,
*/
int os_thread_join(korp_tid thread, void **retval);
/**
* Detach the thread specified by thread
*
* @param thread the thread to detach
*
* @return return 0 if success
*/
int os_thread_detach(korp_tid);
/**
* Exit current thread
*
* @param retval the return value of the current thread
*/
void os_thread_exit(void *retval);
/**
* Suspend execution of the calling thread for (at least)
* usec microseconds

View File

@ -82,9 +82,9 @@ int os_mutex_init(korp_mutex *mutex);
int os_mutex_destroy(korp_mutex *mutex);
void os_mutex_lock(korp_mutex *mutex);
int os_mutex_lock(korp_mutex *mutex);
void os_mutex_unlock(korp_mutex *mutex);
int os_mutex_unlock(korp_mutex *mutex);
/**************************************************