Minor changes to threading
- Renamed `cpp11_thread.cpp` to `thread.cpp` - Removed features that are only supported by Win32 threads (`thread_wait` with timeout and mutex with spinlock) - Fixed formatting in `thread.cpp`
This commit is contained in:
@@ -53,9 +53,9 @@ thread_create(void (*thread_rout)(void *param), void *param)
|
||||
|
||||
|
||||
int
|
||||
thread_wait(thread_t *arg, int timeout)
|
||||
thread_wait(thread_t *arg)
|
||||
{
|
||||
return pthread_join(*(pthread_t*)(arg), NULL) != 0;
|
||||
return pthread_join(*(pthread_t*)(arg), NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -144,14 +144,6 @@ thread_create_mutex(void)
|
||||
}
|
||||
|
||||
|
||||
mutex_t *
|
||||
thread_create_mutex_with_spin_count(unsigned int spin_count)
|
||||
{
|
||||
/* Setting spin count of a mutex is not possible with pthreads. */
|
||||
return thread_create_mutex();
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
thread_wait_mutex(mutex_t *_mutex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user