diff options
| author | Andreas Fankhauser hiddenalpha.ch | 2026-01-02 12:56:28 +0100 |
|---|---|---|
| committer | Andreas Fankhauser hiddenalpha.ch | 2026-01-02 12:56:28 +0100 |
| commit | 994939ab62c28bb0e7c180b4fff085bdf9d00256 (patch) | |
| tree | aca37129de749a0a990e3ed6a5fed037eda04252 /include | |
| parent | 98d511c55fe8e37ce571fd11c3532a4d533aabbd (diff) | |
| download | Qntan-994939ab62c28bb0e7c180b4fff085bdf9d00256.tar.gz Qntan-994939ab62c28bb0e7c180b4fff085bdf9d00256.zip | |
Add Mutx/Cond method macros
Diffstat (limited to 'include')
| -rw-r--r-- | include/qntan/Qntan.h | 17 |
1 files changed, 17 insertions, 0 deletions
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 |
