newlib-2.1.0
git-svn-id: svn://kolibrios.org@4921 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#ifndef MALLOC_PROVIDED
|
||||
/*
|
||||
FUNCTION
|
||||
<<__malloc_lock>>, <<__malloc_unlock>>---lock malloc pool
|
||||
@@ -38,19 +39,26 @@ that it already holds.
|
||||
#include <malloc.h>
|
||||
#include <sys/lock.h>
|
||||
|
||||
#ifndef __SINGLE_THREAD__
|
||||
__LOCK_INIT_RECURSIVE(static, __malloc_lock_object);
|
||||
#endif
|
||||
|
||||
void
|
||||
__malloc_lock (ptr)
|
||||
struct _reent *ptr;
|
||||
{
|
||||
#ifndef __SINGLE_THREAD__
|
||||
__lock_acquire_recursive (__malloc_lock_object);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
__malloc_unlock (ptr)
|
||||
struct _reent *ptr;
|
||||
{
|
||||
#ifndef __SINGLE_THREAD__
|
||||
__lock_release_recursive (__malloc_lock_object);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user