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:
authorChristopher Faylor <me@cgf.cx>2002-02-15 00:20:06 +0300
committerChristopher Faylor <me@cgf.cx>2002-02-15 00:20:06 +0300
commit907dc7d0c9f64d95b6d4da91dab6601d0e6054ec (patch)
tree09bc7dae25c4c1f67767dfc04fb1ee4c3a08c371 /winsup/cygwin/sync.h
parent27530c31810976dec063f8ffdc6709945dfcef39 (diff)
* exceptions.cc (unused_sig_wrapper): Eliminate unused parameter to asm.
* external.cc (cygwin_internal): Change CW_STRACE_ON to CW_STRACE_TOGGLE. * strace.cc (strace::hello): Toggle strace on and off. * sync.cc (muto::init): Renamed from constructor. * sync.h (muto::new): Delete. (muto::delete): Ditto. (new_muto): Simplify. Use muto.init for nearly everything. * uinfo.cc (uinfo_init): Avoid closing a NULL handle. * include/sys/cygwin.h (cygwin_getinfo_types): Rename CW_STRACE_OFF to CW_STRACE_TOGGLE. Delete CW_STRACE_OFF. * include/sys/strace.h (strace): Add "inited" field.
Diffstat (limited to 'winsup/cygwin/sync.h')
-rw-r--r--winsup/cygwin/sync.h21
1 files changed, 7 insertions, 14 deletions
diff --git a/winsup/cygwin/sync.h b/winsup/cygwin/sync.h
index d546b71e5..756503d86 100644
--- a/winsup/cygwin/sync.h
+++ b/winsup/cygwin/sync.h
@@ -23,17 +23,13 @@ public:
class muto *next;
const char *name;
- muto() {}
/* The real constructor. */
- muto(int inh, const char *name);
+ muto *init(int inh, const char *name) __attribute__ ((regparm (3)));
- void *operator new (size_t, void *p) {return p;}
- void *operator new (size_t) {return ::new muto; }
- void operator delete (void *) {;} /* can't handle allocated mutos
- currently */
-
- ~muto ();
- int acquire (DWORD ms = INFINITE) __attribute__ ((regparm(1))); /* Acquire the lock. */
+#if 0 /* FIXME: See comment in sync.cc */
+ ~muto ()
+#endif
+ int acquire (DWORD ms = INFINITE) __attribute__ ((regparm (1))); /* Acquire the lock. */
int release (); /* Release the lock. */
/* Return true if caller thread owns the lock. */
@@ -48,9 +44,6 @@ extern muto muto_start;
/* Use a statically allocated buffer as the storage for a muto */
#define new_muto(__inh, __name) \
({ \
- static volatile __attribute__((section(".data_cygwin_nocopy"))) muto __mbuf; \
- (void) new ((void *) &__mbuf) muto (__inh, __name); \
- __mbuf.next = muto_start.next; \
- muto_start.next = (muto *) &__mbuf; \
- (muto *) &__mbuf; \
+ static muto __mbuf __attribute__((section(".data_cygwin_nocopy"))); \
+ __mbuf.init (__inh, __name); \
})