Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/sync.h')
-rw-r--r--winsup/cygwin/sync.h8
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); \
+})