Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2006-09-06 23:13:23 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2006-09-06 23:13:23 +0400
commite7d6537f1c5227005ccddc52987ea720ba66bc80 (patch)
tree5ac48fd44121194b879fc002d369281494a7598d /source/blender/blenlib/BLI_threads.h
parentd444f25b2864b7d4a9ae39211c695e36ffd813a8 (diff)
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.
Diffstat (limited to 'source/blender/blenlib/BLI_threads.h')
-rw-r--r--source/blender/blenlib/BLI_threads.h10
1 files changed, 1 insertions, 9 deletions
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