diff options
author | Ton Roosendaal <ton@blender.org> | 2006-03-13 14:01:17 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-03-13 14:01:17 +0300 |
commit | 34a5739a8a9e579b8e07eb06c0fad9f449d433e6 (patch) | |
tree | d53c94c57f1fb466b5cf9854d29b1ba758ed421c /source/blender/blenlib/BLI_threads.h | |
parent | 0b9c41e5511120aec1214f95d0cfb1b9b07e1d6a (diff) |
Two fixes in renderpipe...
- Renderwin still used a thread-unsafe malloc, in the header text print
- Setting clipping flags in vertices for parts required a mutex lock after
all... I thought it would go fine, but noticed on renders with small
amounts of faces that sometimes faces disappear from a render.
(was doing movie credits, so all faces are visible! Otherwise it would
have hardly been noticable...)
Diffstat (limited to 'source/blender/blenlib/BLI_threads.h')
-rw-r--r-- | source/blender/blenlib/BLI_threads.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/blenlib/BLI_threads.h b/source/blender/blenlib/BLI_threads.h index 00ea4f7aaab..43792ccb1bc 100644 --- a/source/blender/blenlib/BLI_threads.h +++ b/source/blender/blenlib/BLI_threads.h @@ -31,6 +31,10 @@ #ifndef BLI_THREADS_H #define BLI_THREADS_H +/* default lock is to protect MEM_ module calls, one custom lock available now. van be extended */ +#define LOCK_MALLOC 0 +#define LOCK_CUSTOM1 1 + void BLI_init_threads (ListBase *threadbase, void *(*do_thread)(void *), int tot); int BLI_available_threads(ListBase *threadbase); @@ -39,8 +43,8 @@ void BLI_insert_thread (ListBase *threadbase, void *callerdata); void BLI_remove_thread (ListBase *threadbase, void *callerdata); void BLI_end_threads (ListBase *threadbase); -void BLI_lock_thread (void); -void BLI_unlock_thread (void); +void BLI_lock_thread (int type); +void BLI_unlock_thread (int type); /* threadsafe version of MEM_malloc and friends */ void *MEM_mallocT(int len, char *name); |