diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-12-09 12:01:44 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-12-09 12:01:44 +0300 |
commit | 9e365069afe156f33fadfad9705e1325f894cd54 (patch) | |
tree | 78373044d029feb51f987b45208e0c1a36958625 /source/blender/blenlib/BLI_threads.h | |
parent | d8b42751625c915113b64f5a2d9c72f19f009fee (diff) |
Cleanup: move public doc-strings into headers for 'blenlib'
- Added space below non doc-string comments to make it clear
these aren't comments for the symbols directly below them.
- Use doxy sections for some headers.
- Minor improvements to doc-strings.
Ref T92709
Diffstat (limited to 'source/blender/blenlib/BLI_threads.h')
-rw-r--r-- | source/blender/blenlib/BLI_threads.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/source/blender/blenlib/BLI_threads.h b/source/blender/blenlib/BLI_threads.h index 4f71e3aa6e4..6e60430ea38 100644 --- a/source/blender/blenlib/BLI_threads.h +++ b/source/blender/blenlib/BLI_threads.h @@ -38,12 +38,24 @@ struct ListBase; /* Threading API */ -/* This is run once at startup. */ +/** + * This is run once at startup. + */ void BLI_threadapi_init(void); void BLI_threadapi_exit(void); +/** + * \param tot: When 0 only initializes malloc mutex in a safe way (see sequence.c) + * problem otherwise: scene render will kill of the mutex! + */ void BLI_threadpool_init(struct ListBase *threadbase, void *(*do_thread)(void *), int tot); +/** + * Amount of available threads. + */ int BLI_available_threads(struct ListBase *threadbase); +/** + * Returns thread number, for sample patterns or threadsafe tables. + */ int BLI_threadpool_available_thread_index(struct ListBase *threadbase); void BLI_threadpool_insert(struct ListBase *threadbase, void *callerdata); void BLI_threadpool_remove(struct ListBase *threadbase, void *callerdata); @@ -54,7 +66,10 @@ int BLI_thread_is_main(void); /* System Information */ -int BLI_system_thread_count(void); /* gets the number of threads the system can make use of */ +/** + * \return the number of threads the system can make use of. + */ +int BLI_system_thread_count(void); void BLI_system_num_threads_override_set(int num); int BLI_system_num_threads_override_get(void); @@ -198,6 +213,7 @@ void BLI_thread_queue_nowait(ThreadQueue *queue); /* **** Special functions to help performance on crazy NUMA setups. **** */ /* Make sure process/thread is using NUMA node with fast memory access. */ + void BLI_thread_put_process_on_fast_node(void); void BLI_thread_put_thread_on_fast_node(void); |