From c1279768a77d093e1747f4954c9c0a959feefdf0 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Wed, 8 Dec 2021 00:31:20 -0500 Subject: Cleanup: Clang-Tidy modernize-redundant-void-arg --- source/blender/blenlib/intern/threads.cc | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) (limited to 'source/blender/blenlib/intern/threads.cc') diff --git a/source/blender/blenlib/intern/threads.cc b/source/blender/blenlib/intern/threads.cc index 35097013439..15bdb08f89f 100644 --- a/source/blender/blenlib/intern/threads.cc +++ b/source/blender/blenlib/intern/threads.cc @@ -140,7 +140,7 @@ struct ThreadSlot { int avail; }; -void BLI_threadapi_init(void) +void BLI_threadapi_init() { mainid = pthread_self(); if (numaAPI_Initialize() == NUMAAPI_SUCCESS) { @@ -148,7 +148,7 @@ void BLI_threadapi_init(void) } } -void BLI_threadapi_exit(void) +void BLI_threadapi_exit() { } @@ -231,7 +231,7 @@ static void *tslot_thread_start(void *tslot_p) return tslot->do_thread(tslot->callerdata); } -int BLI_thread_is_main(void) +int BLI_thread_is_main() { return pthread_equal(pthread_self(), mainid); } @@ -306,7 +306,7 @@ void BLI_threadpool_end(ListBase *threadbase) /* System Information */ /* how many threads are native on this system? */ -int BLI_system_thread_count(void) +int BLI_system_thread_count() { static int t = -1; @@ -347,7 +347,7 @@ void BLI_system_num_threads_override_set(int num) num_threads_override = num; } -int BLI_system_num_threads_override_get(void) +int BLI_system_num_threads_override_get() { return num_threads_override; } @@ -418,7 +418,7 @@ void BLI_mutex_end(ThreadMutex *mutex) pthread_mutex_destroy(mutex); } -ThreadMutex *BLI_mutex_alloc(void) +ThreadMutex *BLI_mutex_alloc() { ThreadMutex *mutex = static_cast(MEM_callocN(sizeof(ThreadMutex), "ThreadMutex")); BLI_mutex_init(mutex); @@ -533,7 +533,7 @@ void BLI_rw_mutex_end(ThreadRWMutex *mutex) pthread_rwlock_destroy(mutex); } -ThreadRWMutex *BLI_rw_mutex_alloc(void) +ThreadRWMutex *BLI_rw_mutex_alloc() { ThreadRWMutex *mutex = static_cast( MEM_callocN(sizeof(ThreadRWMutex), "ThreadRWMutex")); @@ -555,7 +555,7 @@ struct TicketMutex { unsigned int queue_head, queue_tail; }; -TicketMutex *BLI_ticket_mutex_alloc(void) +TicketMutex *BLI_ticket_mutex_alloc() { TicketMutex *ticket = static_cast( MEM_callocN(sizeof(TicketMutex), "TicketMutex")); @@ -640,7 +640,7 @@ struct ThreadQueue { volatile int canceled; }; -ThreadQueue *BLI_thread_queue_init(void) +ThreadQueue *BLI_thread_queue_init() { ThreadQueue *queue; @@ -818,8 +818,7 @@ void BLI_thread_queue_wait_finish(ThreadQueue *queue) /* **** Special functions to help performance on crazy NUMA setups. **** */ #if 0 /* UNUSED */ -static bool check_is_threadripper2_alike_topology(void) -{ +static bool check_is_threadripper2_alike_topology(){ /* NOTE: We hope operating system does not support CPU hot-swap to * a different brand. And that SMP of different types is also not * encouraged by the system. */ @@ -860,8 +859,7 @@ static bool check_is_threadripper2_alike_topology(void) return is_threadripper2; } -static void threadripper_put_process_on_fast_node(void) -{ +static void threadripper_put_process_on_fast_node(){ if (!is_numa_available) { return; } @@ -880,8 +878,7 @@ static void threadripper_put_process_on_fast_node(void) numaAPI_RunProcessOnNode(0); } -static void threadripper_put_thread_on_fast_node(void) -{ +static void threadripper_put_thread_on_fast_node(){ if (!is_numa_available) { return; } @@ -899,7 +896,7 @@ static void threadripper_put_thread_on_fast_node(void) } #endif /* UNUSED */ -void BLI_thread_put_process_on_fast_node(void) +void BLI_thread_put_process_on_fast_node() { /* Disabled for now since this causes only 16 threads to be used on a * thread-ripper for computations like sculpting and fluid sim. The problem @@ -915,7 +912,7 @@ void BLI_thread_put_process_on_fast_node(void) #endif } -void BLI_thread_put_thread_on_fast_node(void) +void BLI_thread_put_thread_on_fast_node() { /* Disabled for now, see comment above. */ #if 0 -- cgit v1.2.3