diff options
author | Christopher Faylor <me@cgf.cx> | 2004-05-15 16:09:04 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2004-05-15 16:09:04 +0000 |
commit | 71af2ed39e0c727eb8b9df6bdc1d9dbed762ad5d (patch) | |
tree | 69921ab4064acfef57405505ae50ca752b64abbc /winsup/cygwin/sync.h | |
parent | 982c8ecdb4c8bd31c7a145117c74199e56a2dfdc (diff) | |
download | cygnal-71af2ed39e0c727eb8b9df6bdc1d9dbed762ad5d.tar.gz cygnal-71af2ed39e0c727eb8b9df6bdc1d9dbed762ad5d.tar.bz2 cygnal-71af2ed39e0c727eb8b9df6bdc1d9dbed762ad5d.zip |
* cygheap.h: Remove some parameter names from declarations throughout.
(cygheap::set): Reflect changes in declaration for arguments and return value
from previous checkin.
Diffstat (limited to 'winsup/cygwin/sync.h')
-rw-r--r-- | winsup/cygwin/sync.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/winsup/cygwin/sync.h b/winsup/cygwin/sync.h index 24de97428..32ca14766 100644 --- a/winsup/cygwin/sync.h +++ b/winsup/cygwin/sync.h @@ -38,7 +38,6 @@ public: /* Return true if caller thread owns the lock. */ int ismine () {return tid == GetCurrentThreadId ();} DWORD owner () {return tid;} - int unstable () {return !tid && (sync || waiters >= 0);} void reset () __attribute__ ((regparm (1))); bool acquired (); static void set_exiting_thread () {exiting_thread = GetCurrentThreadId ();} @@ -59,4 +58,11 @@ extern muto muto_start; static muto __storage __attribute__((nocommon)) __attribute__((section(".data_cygwin_nocopy1"))); \ __name = __storage.init (#__name); \ }) + +/* Use a statically allocated buffer as the storage for a muto */ +#define new_muto_name(__var, __name) \ +({ \ + static muto __var##_storage __attribute__((nocommon)) __attribute__((section(".data_cygwin_nocopy1"))); \ + __var = __var##_storage.init (__name); \ +}) #endif /*_SYNC_H*/ |