1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/sync/sync_mac.v
Alexander Medvednikov ce3d560e09 sync module
2019-06-22 21:54:43 +02:00

16 lines
195 B
Go

module sync
#include <pthread.h>
struct Mutex {
mutex C.pthread_mutex_t
}
fn (m Mutex) lock() {
C.pthread_mutex_lock(&m.mutex)
}
fn (m Mutex) unlock() {
C.pthread_mutex_unlock(&m.mutex)
}