summaryrefslogtreecommitdiff
path: root/mysys/my_lockmem.c
diff options
context:
space:
mode:
authorMarc Alff <marc.alff@sun.com>2009-12-09 20:19:51 -0700
committerMarc Alff <marc.alff@sun.com>2009-12-09 20:19:51 -0700
commitc082955f0676efe069f30384102ba7807b49dee6 (patch)
treecc0a038191d1969182d5dd108c891ee10a436cc0 /mysys/my_lockmem.c
parent6fd3866c6c104f8bc991d71583e627ae6fabe0ab (diff)
downloadmariadb-git-c082955f0676efe069f30384102ba7807b49dee6.tar.gz
WL#2360 Performance schema
Part III: mysys instrumentation
Diffstat (limited to 'mysys/my_lockmem.c')
-rw-r--r--mysys/my_lockmem.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mysys/my_lockmem.c b/mysys/my_lockmem.c
index f2c6d52a382..1b582783d33 100644
--- a/mysys/my_lockmem.c
+++ b/mysys/my_lockmem.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (C) 2000 MySQL AB, 2008-2009 Sun Microsystems, Inc
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -66,9 +66,9 @@ uchar *my_malloc_lock(uint size,myf MyFlags)
element->list.data=(uchar*) element;
element->page=ptr;
element->size=size;
- pthread_mutex_lock(&THR_LOCK_malloc);
+ mysql_mutex_lock(&THR_LOCK_malloc);
mem_list=list_add(mem_list,&element->list);
- pthread_mutex_unlock(&THR_LOCK_malloc);
+ mysql_mutex_unlock(&THR_LOCK_malloc);
}
DBUG_RETURN(ptr);
}
@@ -79,7 +79,7 @@ void my_free_lock(uchar *ptr,myf Myflags __attribute__((unused)))
LIST *list;
struct st_mem_list *element=0;
- pthread_mutex_lock(&THR_LOCK_malloc);
+ mysql_mutex_lock(&THR_LOCK_malloc);
for (list=mem_list ; list ; list=list->next)
{
element=(struct st_mem_list*) list->data;
@@ -90,7 +90,7 @@ void my_free_lock(uchar *ptr,myf Myflags __attribute__((unused)))
break;
}
}
- pthread_mutex_unlock(&THR_LOCK_malloc);
+ mysql_mutex_unlock(&THR_LOCK_malloc);
if (element)
my_free((uchar*) element,MYF(0));
free(ptr); /* Free even if not locked */