* 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.
This commit is contained in:
@ -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); \
|
||||
})
|
||||
|
Reference in New Issue
Block a user