libnx/nx/include/switch/kernel/mutex.h
TuxSH 5abc4873d8 Include only what is really necessary...
add pragma once in every header, etc.
2018-01-22 18:42:57 +01:00

26 lines
467 B
C

// Copyright 2017 plutoo
#pragma once
#include <sys/lock.h>
#include <switch/types.h> // not needed in this file, still including it
typedef _LOCK_T Mutex;
typedef _LOCK_RECURSIVE_T RMutex;
static inline void mutexInit(Mutex* m)
{
*m = 0;
}
void mutexLock(Mutex* m);
void mutexUnlock(Mutex* m);
static inline void rmutexInit(RMutex* m)
{
m->lock = 0;
m->thread_tag = 0;
m->counter = 0;
}
void rmutexLock(RMutex* m);
void rmutexUnlock(RMutex* m);