diff options
Diffstat (limited to 'src/std/thread.c')
-rw-r--r-- | src/std/thread.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/std/thread.c b/src/std/thread.c index 87362d2..9b9b764 100644 --- a/src/std/thread.c +++ b/src/std/thread.c @@ -120,11 +120,11 @@ void amal_mutex_deinit(amal_mutex *self) { pthread_mutex_destroy(&self->mutex); } -static long amal_process_get_id() { +static long amal_process_get_id(void) { return getpid(); } -static long amal_thread_get_id() { +static long amal_thread_get_id(void) { return syscall(SYS_gettid); } @@ -173,11 +173,11 @@ void amal_mutex_tryunlock(amal_mutex *self) { ignore_result_int(amal_mutex_unlock(self)); } -bool amal_thread_is_main() { +bool amal_thread_is_main(void) { /* TODO: This only works for linux, use equivalent functions on other platforms */ return amal_thread_get_id() == amal_process_get_id(); } -int amal_get_usable_thread_count() { +int amal_get_usable_thread_count(void) { return get_nprocs(); } |