diff options
author | Christopher Faylor <me@cgf.cx> | 2012-07-23 04:36:48 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2012-07-23 04:36:48 +0000 |
commit | 44aa2292b745468ad349f771f6f257db0e7f601a (patch) | |
tree | ae59c7cfa4ea7a4e3fcaaf770136d5bd59ea3052 | |
parent | 962f9a2ccc6cd7f24a2d89d68bd8b59d43f8ac8a (diff) | |
download | newlib-44aa2292b745468ad349f771f6f257db0e7f601a.zip newlib-44aa2292b745468ad349f771f6f257db0e7f601a.tar.gz newlib-44aa2292b745468ad349f771f6f257db0e7f601a.tar.bz2 |
Change "set_thread_waiting" to "set_signal_arrived" throughout.
-rw-r--r-- | winsup/cygwin/ChangeLog | 4 | ||||
-rw-r--r-- | winsup/cygwin/DevNotes | 2 | ||||
-rw-r--r-- | winsup/cygwin/cygthread.cc | 2 | ||||
-rw-r--r-- | winsup/cygwin/cygtls.h | 8 | ||||
-rw-r--r-- | winsup/cygwin/cygwait.cc | 2 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_socket.cc | 2 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_windows.cc | 2 | ||||
-rw-r--r-- | winsup/cygwin/flock.cc | 2 | ||||
-rw-r--r-- | winsup/cygwin/posix_ipc.cc | 2 | ||||
-rw-r--r-- | winsup/cygwin/select.cc | 2 |
10 files changed, 16 insertions, 12 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 85f8898..7d124a3 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2012-07-23 Christopher Faylor <me.cygwin2012@cgf.cx> + + Change "set_thread_waiting" to "set_signal_arrived" throughout. + 2012-07-21 Christopher Faylor <me.cygwin2012@cgf.cx> * DevNotes: Add entry cgf-000013. diff --git a/winsup/cygwin/DevNotes b/winsup/cygwin/DevNotes index cd8caf8..e783488 100644 --- a/winsup/cygwin/DevNotes +++ b/winsup/cygwin/DevNotes @@ -4,7 +4,7 @@ These changes reflect a revamp of the "wait for signal" functionality which has existed in Cygwin through several signal massages. We now create a signal event only when a thread is waiting for a signal -and arm it only for that thread. The "set_thread_waiting" function is +and arm it only for that thread. The "set_signal_arrived" function is used to establish the event and set it in a location referencable by the caller. diff --git a/winsup/cygwin/cygthread.cc b/winsup/cygwin/cygthread.cc index a9d36ff..5afc429 100644 --- a/winsup/cygwin/cygthread.cc +++ b/winsup/cygwin/cygthread.cc @@ -377,7 +377,7 @@ cygthread::detach (HANDLE sigwait) unsigned n = 2; DWORD howlong = INFINITE; w4[0] = sigwait; - set_thread_waiting here (w4[1]); + set_signal_arrived here (w4[1]); /* For a description of the below loop see the end of this file */ for (int i = 0; i < 2; i++) switch (res = WaitForMultipleObjects (n, w4, FALSE, howlong)) diff --git a/winsup/cygwin/cygtls.h b/winsup/cygwin/cygtls.h index 03e44dc..b6668db 100644 --- a/winsup/cygwin/cygtls.h +++ b/winsup/cygwin/cygtls.h @@ -315,14 +315,14 @@ public: } }; -class set_thread_waiting +class set_signal_arrived { public: - set_thread_waiting (bool setit, HANDLE& h) { _my_tls.set_signal_arrived (setit, h); } - set_thread_waiting (HANDLE& h) { _my_tls.set_signal_arrived (true, h); } + set_signal_arrived (bool setit, HANDLE& h) { _my_tls.set_signal_arrived (setit, h); } + set_signal_arrived (HANDLE& h) { _my_tls.set_signal_arrived (true, h); } operator int () const {return _my_tls.signal_waiting;} - ~set_thread_waiting () { _my_tls.signal_waiting = false; } + ~set_signal_arrived () { _my_tls.signal_waiting = false; } }; #define __getreent() (&_my_tls.local_clib) diff --git a/winsup/cygwin/cygwait.cc b/winsup/cygwin/cygwait.cc index c48e1e1..d1247f4 100644 --- a/winsup/cygwin/cygwait.cc +++ b/winsup/cygwin/cygwait.cc @@ -38,7 +38,7 @@ cancelable_wait (HANDLE object, PLARGE_INTEGER timeout, unsigned mask) if (object) wait_objects[num++] = object; - set_thread_waiting thread_waiting (is_cw_sig_handle, wait_objects[num]); + set_signal_arrived thread_waiting (is_cw_sig_handle, wait_objects[num]); debug_printf ("thread waiting %d, signal_arrived %p", (int) thread_waiting, _my_tls.signal_arrived); DWORD sig_n; if (!thread_waiting) diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc index 971df68..054eafe 100644 --- a/winsup/cygwin/fhandler_socket.cc +++ b/winsup/cygwin/fhandler_socket.cc @@ -658,7 +658,7 @@ fhandler_socket::wait_for_events (const long event_mask, const DWORD flags) } WSAEVENT ev[2] = { wsock_evt }; - set_thread_waiting here (ev[1]); + set_signal_arrived here (ev[1]); switch (WSAWaitForMultipleEvents (2, ev, FALSE, 50, FALSE)) { case WSA_WAIT_TIMEOUT: diff --git a/winsup/cygwin/fhandler_windows.cc b/winsup/cygwin/fhandler_windows.cc index 11fb6c0..cb22416 100644 --- a/winsup/cygwin/fhandler_windows.cc +++ b/winsup/cygwin/fhandler_windows.cc @@ -97,7 +97,7 @@ fhandler_windows::read (void *buf, size_t& len) } HANDLE w4[3] = { get_handle (), }; - set_thread_waiting here (w4[1]); + set_signal_arrived here (w4[1]); DWORD cnt = 2; if ((w4[cnt] = pthread::get_cancel_event ()) != NULL) ++cnt; diff --git a/winsup/cygwin/flock.cc b/winsup/cygwin/flock.cc index 9a5c8da..4d683cf 100644 --- a/winsup/cygwin/flock.cc +++ b/winsup/cygwin/flock.cc @@ -1247,7 +1247,7 @@ lf_setlock (lockf_t *lock, inode_t *node, lockf_t **clean, HANDLE fhdl) timeout = 100L; DWORD WAIT_SIGNAL_ARRIVED = WAIT_OBJECT_0 + wait_count; - set_thread_waiting here (w4[wait_count++]); + set_signal_arrived here (w4[wait_count++]); DWORD WAIT_THREAD_CANCELED = WAIT_TIMEOUT + 1; HANDLE cancel_event = pthread::get_cancel_event (); diff --git a/winsup/cygwin/posix_ipc.cc b/winsup/cygwin/posix_ipc.cc index a8141f1..d09abf1 100644 --- a/winsup/cygwin/posix_ipc.cc +++ b/winsup/cygwin/posix_ipc.cc @@ -177,7 +177,7 @@ ipc_cond_timedwait (HANDLE evt, HANDLE mtx, const struct timespec *abstime) DWORD timer_idx = 0; int ret = 0; - set_thread_waiting here (w4[1]); + set_signal_arrived here (w4[1]); if ((w4[cnt] = pthread::get_cancel_event ()) != NULL) ++cnt; if (abstime) diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index bab2c01..3122c82 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -332,7 +332,7 @@ select_stuff::wait (fd_set *readfds, fd_set *writefds, fd_set *exceptfds, select_record *s = &start; DWORD m = 0; - set_thread_waiting here (w4[m++]); + set_signal_arrived here (w4[m++]); if ((w4[m] = pthread::get_cancel_event ()) != NULL) m++; |