|
@@ -13,7 +13,7 @@ Atomic_Mutex_State :: enum Futex {
|
|
// The zero value for a Atomic_Mutex is an unlocked mutex
|
|
// The zero value for a Atomic_Mutex is an unlocked mutex
|
|
//
|
|
//
|
|
// An Atomic_Mutex must not be copied after first use
|
|
// An Atomic_Mutex must not be copied after first use
|
|
-Atomic_Mutex :: struct {
|
|
|
|
|
|
+Atomic_Mutex :: struct #no_copy {
|
|
state: Atomic_Mutex_State,
|
|
state: Atomic_Mutex_State,
|
|
}
|
|
}
|
|
|
|
|
|
@@ -109,7 +109,7 @@ Atomic_RW_Mutex_State_Reader_Mask :: Atomic_RW_Mutex_State(1<<(Atomic_RW_Mutex_S
|
|
// The zero value for an Atomic_RW_Mutex is an unlocked mutex
|
|
// The zero value for an Atomic_RW_Mutex is an unlocked mutex
|
|
//
|
|
//
|
|
// An Atomic_RW_Mutex must not be copied after first use
|
|
// An Atomic_RW_Mutex must not be copied after first use
|
|
-Atomic_RW_Mutex :: struct {
|
|
|
|
|
|
+Atomic_RW_Mutex :: struct #no_copy {
|
|
state: Atomic_RW_Mutex_State,
|
|
state: Atomic_RW_Mutex_State,
|
|
mutex: Atomic_Mutex,
|
|
mutex: Atomic_Mutex,
|
|
sema: Atomic_Sema,
|
|
sema: Atomic_Sema,
|
|
@@ -222,7 +222,7 @@ atomic_rw_mutex_shared_guard :: proc "contextless" (m: ^Atomic_RW_Mutex) -> bool
|
|
// The zero value for a Recursive_Mutex is an unlocked mutex
|
|
// The zero value for a Recursive_Mutex is an unlocked mutex
|
|
//
|
|
//
|
|
// An Atomic_Recursive_Mutex must not be copied after first use
|
|
// An Atomic_Recursive_Mutex must not be copied after first use
|
|
-Atomic_Recursive_Mutex :: struct {
|
|
|
|
|
|
+Atomic_Recursive_Mutex :: struct #no_copy {
|
|
owner: int,
|
|
owner: int,
|
|
recursion: int,
|
|
recursion: int,
|
|
mutex: Mutex,
|
|
mutex: Mutex,
|
|
@@ -285,7 +285,7 @@ atomic_recursive_mutex_guard :: proc "contextless" (m: ^Atomic_Recursive_Mutex)
|
|
// waiting for signalling the occurence of an event
|
|
// waiting for signalling the occurence of an event
|
|
//
|
|
//
|
|
// An Atomic_Cond must not be copied after first use
|
|
// An Atomic_Cond must not be copied after first use
|
|
-Atomic_Cond :: struct {
|
|
|
|
|
|
+Atomic_Cond :: struct #no_copy {
|
|
state: Futex,
|
|
state: Futex,
|
|
}
|
|
}
|
|
|
|
|
|
@@ -320,7 +320,7 @@ atomic_cond_broadcast :: proc "contextless" (c: ^Atomic_Cond) {
|
|
// Posting to the semaphore increases the count by one, or the provided amount.
|
|
// Posting to the semaphore increases the count by one, or the provided amount.
|
|
//
|
|
//
|
|
// An Atomic_Sema must not be copied after first use
|
|
// An Atomic_Sema must not be copied after first use
|
|
-Atomic_Sema :: struct {
|
|
|
|
|
|
+Atomic_Sema :: struct #no_copy {
|
|
count: Futex,
|
|
count: Futex,
|
|
}
|
|
}
|
|
|
|
|