diff options
Diffstat (limited to 'winsup/cygwin/sync.h')
-rw-r--r-- | winsup/cygwin/sync.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/winsup/cygwin/sync.h b/winsup/cygwin/sync.h index 9cd50c3ac..dfc4ba7fa 100644 --- a/winsup/cygwin/sync.h +++ b/winsup/cygwin/sync.h @@ -37,6 +37,7 @@ public: DWORD owner () {return tid;} int unstable () {return !tid && (sync || waiters >= 0);} void reset () __attribute__ ((regparm (1))); + bool acquired (); }; extern muto muto_start; @@ -47,3 +48,10 @@ extern muto muto_start; static muto __name##_storage __attribute__((nocommon)) __attribute__((section(".data_cygwin_nocopy"))); \ __name = __name##_storage.init (#__name); \ }) + +/* Use a statically allocated buffer as the storage for a muto */ +#define new_muto1(__name, __storage) \ +({ \ + static muto __storage __attribute__((nocommon)) __attribute__((section(".data_cygwin_nocopy"))); \ + __name = __storage.init (#__name); \ +}) |