1
0
Fork 0
mirror of https://github.com/tailix/libkernaux.git synced 2024-11-13 11:04:27 -05:00
libkernaux/include/kernaux/generic/mutex.h

26 lines
537 B
C
Raw Permalink Normal View History

2022-06-18 06:14:17 -04:00
#ifndef KERNAUX_INCLUDED_MUTEX
#define KERNAUX_INCLUDED_MUTEX
#ifdef __cplusplus
extern "C" {
#endif
2022-06-20 17:28:35 -04:00
#include <kernaux/macro.h>
2022-06-18 06:14:17 -04:00
2022-06-20 17:28:35 -04:00
typedef void (*KernAux_Mutex_Lock )(void *mutex);
typedef void (*KernAux_Mutex_Unlock)(void *mutex);
2022-06-18 06:14:17 -04:00
2022-06-25 11:43:18 -04:00
typedef const struct KernAux_Mutex {
2022-06-20 17:28:35 -04:00
KernAux_Mutex_Lock KERNAUX_PROTECTED_FIELD(lock);
KernAux_Mutex_Unlock KERNAUX_PROTECTED_FIELD(unlock);
2022-06-18 06:14:17 -04:00
} *KernAux_Mutex;
void KernAux_Mutex_lock (KernAux_Mutex mutex);
void KernAux_Mutex_unlock(KernAux_Mutex mutex);
#ifdef __cplusplus
}
#endif
#endif