diff options
| author | Berke Güzel <wenekar1@gmail.com> | 2026-10-13 13:44:13 +0300 |
|---|---|---|
| committer | Berke Güzel <wenekar1@gmail.com> | 2026-10-13 13:44:13 +0300 |
| commit | c059e3aa7f93da470f052a5cd8ee0d8dc969e679 (patch) | |
| tree | 63ffa378287ed2c606eda2e940501b9edc3d2b8b /src/platform/posix/yasl_platform_sync.h | |
| parent | 87d0bc50d53dc216efb2b04495f090616318bc5c (diff) | |
rename and simplification
Diffstat (limited to 'src/platform/posix/yasl_platform_sync.h')
| -rw-r--r-- | src/platform/posix/yasl_platform_sync.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/platform/posix/yasl_platform_sync.h b/src/platform/posix/yasl_platform_sync.h new file mode 100644 index 0000000..f94a25d --- /dev/null +++ b/src/platform/posix/yasl_platform_sync.h @@ -0,0 +1,28 @@ +#ifndef YASL_POSIX_SYNC_H +#define YASL_POSIX_SYNC_H + +#include <pthread.h> + +typedef pthread_mutex_t yasl_mutex; + +static inline int yasl_mutex_init(yasl_mutex *mutex) +{ + return pthread_mutex_init(mutex, NULL); +} + +static inline void yasl_mutex_destroy(yasl_mutex *mutex) +{ + pthread_mutex_destroy(mutex); +} + +static inline void yasl_mutex_lock(yasl_mutex *mutex) +{ + pthread_mutex_lock(mutex); +} + +static inline void yasl_mutex_unlock(yasl_mutex *mutex) +{ + pthread_mutex_unlock(mutex); +} + +#endif |
