From 994939ab62c28bb0e7c180b4fff085bdf9d00256 Mon Sep 17 00:00:00 2001 From: Andreas Fankhauser hiddenalpha.ch Date: Fri, 2 Jan 2026 12:56:28 +0100 Subject: Add Mutx/Cond method macros --- include/qntan/Qntan.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'include/qntan/Qntan.h') diff --git a/include/qntan/Qntan.h b/include/qntan/Qntan.h index e0bfab7..27d36df 100644 --- a/include/qntan/Qntan.h +++ b/include/qntan/Qntan.h @@ -806,6 +806,16 @@ struct Qntan_TarDec { +#ifndef Qntan_Cond_wait +# define Qntan_Cond_wait(A, ...) (*(A))->wait(A, __VA_ARGS__) +#endif +#ifndef Qntan_Cond_bcast +# define Qntan_Cond_bcast(A) (*(A))->bcast(A) +#endif +#ifndef Qntan_Cond_signal +# define Qntan_Cond_signal(A) (*(A))->signal(A) +#endif +/**/ struct Qntan_Cond { /* An asynchronous Conditional-Variable. */ @@ -833,6 +843,13 @@ struct Qntan_Cond { +#ifndef Qntan_Mutx_lock +# define Qntan_Mutx_lock(A) (*(A))->lock(A) +#endif +#ifndef Qntan_Mutx_unlock +# define Qntan_Mutx_unlock(A) (*(A))->unlock(A) +#endif +/**/ struct Qntan_Mutx { /* Same idea as a `pthread_mutex_t`, just using virtual funcs, to * increase overkill and make some people sad :D -- cgit v1.3.1