From e7d6537f1c5227005ccddc52987ea720ba66bc80 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 6 Sep 2006 19:13:23 +0000 Subject: Added support for threadsafe MEM_mallocN/MEM_freeN in the guardedalloc module itself, replacing the special MEM_mallocT/MEM_freeT functions. Mutex locking is only enabled when threads are running. There was no good reason to have these separate, it just led to ugly hacks when calling functions with non-threadsafe malloc from threads. --- source/blender/blenlib/BLI_threads.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'source/blender/blenlib/BLI_threads.h') diff --git a/source/blender/blenlib/BLI_threads.h b/source/blender/blenlib/BLI_threads.h index 43792ccb1bc..af2565e3ae5 100644 --- a/source/blender/blenlib/BLI_threads.h +++ b/source/blender/blenlib/BLI_threads.h @@ -31,11 +31,9 @@ #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 +/* one custom lock available now. can be extended */ #define LOCK_CUSTOM1 1 - void BLI_init_threads (ListBase *threadbase, void *(*do_thread)(void *), int tot); int BLI_available_threads(ListBase *threadbase); int BLI_available_thread_index(ListBase *threadbase); @@ -46,11 +44,5 @@ void BLI_end_threads (ListBase *threadbase); 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); -void *MEM_callocT(int len, char *name); -void *MEM_mapallocT(int len, char *name); -void MEM_freeT(void *poin); - #endif -- cgit v1.2.3