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
path: root/intern
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2006-02-24 13:18:48 +0300
committerTon Roosendaal <ton@blender.org>2006-02-24 13:18:48 +0300
commit3bd57e6a6496ab17dfd6a59777d3f5be69b8d1dd (patch)
treec45c22393755c8e8d2b23513d701f4985aedc262 /intern
parent9c4ce4cae112119c35546bdee1ae4a8eb7c507c9 (diff)
Paranoia "volatile" assignment to globals in MEM module. Was suggested to
do this for globals that can be changed within threads.
Diffstat (limited to 'intern')
-rw-r--r--intern/guardedalloc/intern/mallocn.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/intern/guardedalloc/intern/mallocn.c b/intern/guardedalloc/intern/mallocn.c
index d26e39e5bcc..bb117756e66 100644
--- a/intern/guardedalloc/intern/mallocn.c
+++ b/intern/guardedalloc/intern/mallocn.c
@@ -83,8 +83,8 @@ typedef struct MemTail {
/* local functions */
/* --------------------------------------------------------------------- */
-static void addtail(localListBase *listbase, void *vlink);
-static void remlink(localListBase *listbase, void *vlink);
+static void addtail(volatile localListBase *listbase, void *vlink);
+static void remlink(volatile localListBase *listbase, void *vlink);
static void rem_memblock(MemHead *memh);
static void MemorY_ErroR(const char *block, const char *error);
static const char *check_memlist(MemHead *memh);
@@ -111,11 +111,11 @@ static const char *check_memlist(MemHead *memh);
/* --------------------------------------------------------------------- */
-int totblock= 0;
-unsigned long mem_in_use= 0, mmap_in_use= 0;
+volatile int totblock= 0;
+volatile unsigned long mem_in_use= 0, mmap_in_use= 0;
-static struct localListBase _membase;
-static struct localListBase *membase = &_membase;
+volatile static struct localListBase _membase;
+volatile static struct localListBase *membase = &_membase;
static void (*error_callback)(char *) = NULL;
#ifdef malloc
@@ -360,7 +360,7 @@ short MEM_freeN(void *vmemh) /* anders compileertie niet meer */
/* local functions */
/* --------------------------------------------------------------------- */
-static void addtail(localListBase *listbase, void *vlink)
+static void addtail(volatile localListBase *listbase, void *vlink)
{
struct localLink *link= vlink;
@@ -375,7 +375,7 @@ static void addtail(localListBase *listbase, void *vlink)
listbase->last = link;
}
-static void remlink(localListBase *listbase, void *vlink)
+static void remlink(volatile localListBase *listbase, void *vlink)
{
struct localLink *link= vlink;