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:
David Hrdlička
2021-12-17 19:59:25 +01:00
parent 149c67335a
commit 7381ab6928
16 changed files with 29 additions and 58 deletions

View File

@@ -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)
{