d66346789c
Change-Id: Ic274bfb4a8e1a1a10f9a54186b9173dbc0faa4c8
18 lines
314 B
C
18 lines
314 B
C
#include <pthread.h>
|
|
#include "kernel.h"
|
|
|
|
void corelock_init(struct corelock *lk)
|
|
{
|
|
lk->mutex = (pthread_mutex_t) PTHREAD_MUTEX_INITIALIZER;
|
|
}
|
|
|
|
void corelock_lock(struct corelock *lk)
|
|
{
|
|
pthread_mutex_lock(&lk->mutex);
|
|
}
|
|
|
|
|
|
void corelock_unlock(struct corelock *lk)
|
|
{
|
|
pthread_mutex_unlock(&lk->mutex);
|
|
}
|