diff --git a/sync/sync_mac.v b/sync/sync_mac.v new file mode 100644 index 0000000000..ab4fa03523 --- /dev/null +++ b/sync/sync_mac.v @@ -0,0 +1,15 @@ +module sync + +#include +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) +} + diff --git a/sync/sync_win.v b/sync/sync_win.v new file mode 100644 index 0000000000..aec69932d9 --- /dev/null +++ b/sync/sync_win.v @@ -0,0 +1,13 @@ +module sync + +struct Mutex { +} + +fn (m Mutex) lock() { +panic('not implemented') +} + +fn (m Mutex) unlock() { +panic('not implemented') +} +