diff options
Diffstat (limited to 'include/qntan')
| -rw-r--r-- | include/qntan/Qntan.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/qntan/Qntan.h b/include/qntan/Qntan.h index 85c55f2..e0bfab7 100644 --- a/include/qntan/Qntan.h +++ b/include/qntan/Qntan.h @@ -837,10 +837,15 @@ struct Qntan_Mutx { /* Same idea as a `pthread_mutex_t`, just using virtual funcs, to * increase overkill and make some people sad :D */ - void (*lock)( struct Qntan_Mutx** ); + int (*lock)( struct Qntan_Mutx** ); /* Like `pthread_mutex_lock()` + * WARN: this call may block if mutx already locked! So make sure you + * either + * NEVER HOLD THE MUTX FOR TOO LONG ANYWHERE, + * or + * only `lock()` from threads where blocking is ok. */ - void (*unlock)( struct Qntan_Mutx** ); + int (*unlock)( struct Qntan_Mutx** ); /* Like `pthread_mutex_unlock()` */ }; |
