atom_* renamed to atomic_*; add mutex.*

This commit is contained in:
2022-08-31 08:57:57 +02:00
parent f9856341c1
commit 330efbdbb2
7 changed files with 52 additions and 12 deletions

14
mutex.h Normal file
View File

@@ -0,0 +1,14 @@
/*
* Copyright 2022 Oleg Borodin <borodin@unix7.org>
*/
#include <stdint.h>
typedef struct {
int32_t value;
} mutex_t;
void mutex_init(mutex_t* mutex);
int32_t mutex_wait(mutex_t* mutex);
int32_t mutex_post(mutex_t* mutex);