summaryrefslogtreecommitdiff
path: root/lib/libpthread/thread/thread_malloc_lock.c
blob: 68f899983cb9eb5a3d39361537ebdbfa0336665e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <pthread.h>
#include "pthread_private.h"
#include "thread_private.h"
#include "spinlock.h"

static spinlock_t malloc_lock = _SPINLOCK_INITIALIZER;

void
_thread_malloc_lock()
{
	_SPINLOCK(&malloc_lock);
}

void
_thread_malloc_unlock()
{
	_SPINUNLOCK(&malloc_lock);
}