summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/exceptions.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-04-05 04:31:00 +0000
committerChristopher Faylor <me@cgf.cx>2005-04-05 04:31:00 +0000
commit322c131f9f8ec512b0b319aa383d70f8c8e60fbd (patch)
treedfb27bede722fde757fd4b86b2e51f3d6603b84f /winsup/cygwin/exceptions.cc
parent82ae6271bae18731076156c2a52065cfb89d2f53 (diff)
downloadcygnal-322c131f9f8ec512b0b319aa383d70f8c8e60fbd.tar.gz
cygnal-322c131f9f8ec512b0b319aa383d70f8c8e60fbd.tar.bz2
cygnal-322c131f9f8ec512b0b319aa383d70f8c8e60fbd.zip
* sync.h (muto::operator int): New operator.
(locker): Remove unused class. (new_muto): Delete. (new_muto1): Ditto. (new_muto_name): Ditto. * cygheap.cc (cygheap_setup_for_child): Reflect use of static storage for muto rather than pointer. (_csbrk): Ditto. (_cmalloc): Ditto. (_cmalloc): Ditto. (_cfree): Ditto. * cygheap.h (cwdstuff::cwd_lock): Ditto. (cwdstuff::get_drive): Ditto. * cygmalloc.h (__malloc_lock): Ditto. (__malloc_unlock): Ditto. * cygtls.cc (sentry::lock): Ditto. (sentry::sentry): Ditto. (~sentry): Ditto. (_cygtls::init): Ditto. * dcrt0.cc: Ditto. (cygwin_atexit): Ditto. (cygwin_exit): Ditto. * debug.cc (lock_debug::locker): Ditto. (lock_debug::lock_debug): Ditto. (lock_debug::unlock): Ditto. (debug_init): Ditto. * dtable.cc (dtable::init_lock): Ditto. * dtable.h (dtable::lock_cs): Ditto. (dtable::lock): Ditto. (dtable::unlock): Ditto. * exceptions.cc (mask_sync): Ditto. (sighold): Ditto. (set_process_mask_delta): Ditto. (set_signal_mask): Ditto. (events_init): Ditto. * grp.cc (pwdgrp::pwdgrp): Ditto. * malloc_wrapper.cc (mallock): Ditto. (malloc_init): Ditto. * path.cc (cwdstuff::cwd_lock): Ditto. (cwdstuff::get_hash): Ditto. (cwdstuff::get_hash): Ditto. (cwdstuff::init): Ditto. (cwdstuff::set): Ditto. (cwdstuff::get): Ditto. * pwdgrp.h (pwdgrp::pglock): Ditto. (pwdgrp::refresh): Ditto. * sigproc.cc (sync_proc_subproc): Ditto. (get_proc_lock): Ditto. (proc_subproc): Ditto. (_cygtls::remove_wq): Ditto. (proc_terminate): Ditto. (sigproc_init): Ditto. * timer.cc (lock_timer_tracker::protect): Ditto. (lock_timer_tracker::lock_timer_tracker): Ditto. (lock_timer_tracker::~lock_timer_tracker): Ditto. * wininfo.cc (wininfo::_lock;): Ditto. (wininfo::winthread): Ditto. (operator HWND): Ditto. (wininfo::lock): Ditto. (wininfo::release): Ditto. * wininfo.h (wininfo::_lock;): Ditto.
Diffstat (limited to 'winsup/cygwin/exceptions.cc')
-rw-r--r--winsup/cygwin/exceptions.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index db8b5044a..96702b1de 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -49,7 +49,7 @@ static size_t windows_system_directory_length;
/* This is set to indicate that we have already exited. */
static NO_COPY int exit_already = 0;
-static NO_COPY muto *mask_sync = NULL;
+static NO_COPY muto mask_sync;
NO_COPY static struct
{
@@ -901,11 +901,11 @@ sighold (int sig)
syscall_printf ("signal %d out of range", sig);
return -1;
}
- mask_sync->acquire (INFINITE);
+ mask_sync.acquire (INFINITE);
sigset_t mask = myself->getsigmask ();
sigaddset (&mask, sig);
set_signal_mask (mask);
- mask_sync->release ();
+ mask_sync.release ();
return 0;
}
@@ -915,7 +915,7 @@ sighold (int sig)
extern "C" sigset_t
set_process_mask_delta ()
{
- mask_sync->acquire (INFINITE);
+ mask_sync.acquire (INFINITE);
sigset_t newmask, oldmask;
if (_my_tls.deltamask & SIG_NONMASKABLE)
@@ -926,7 +926,7 @@ set_process_mask_delta ()
sigproc_printf ("oldmask %p, newmask %p, deltamask %p", oldmask, newmask,
_my_tls.deltamask);
myself->setsigmask (newmask);
- mask_sync->release ();
+ mask_sync.release ();
return oldmask;
}
@@ -935,7 +935,7 @@ set_process_mask_delta ()
extern "C" void __stdcall
set_signal_mask (sigset_t newmask, sigset_t oldmask)
{
- mask_sync->acquire (INFINITE);
+ mask_sync.acquire (INFINITE);
newmask &= ~SIG_NONMASKABLE;
sigset_t mask_bits = oldmask & ~newmask;
sigproc_printf ("oldmask %p, newmask %p, mask_bits %p", oldmask, newmask,
@@ -945,7 +945,7 @@ set_signal_mask (sigset_t newmask, sigset_t oldmask)
sig_dispatch_pending (true);
else
sigproc_printf ("not calling sig_dispatch_pending");
- mask_sync->release ();
+ mask_sync.release ();
return;
}
@@ -1142,7 +1142,7 @@ events_init (void)
api_fatal ("can't create title mutex '%s', %E", name);
ProtectHandle (tty_mutex);
- new_muto (mask_sync);
+ mask_sync.init ("mask_sync");
windows_system_directory[0] = '\0';
(void) GetSystemDirectory (windows_system_directory, sizeof (windows_system_directory) - 2);
char *end = strchr (windows_system_directory, '\0');