if (alertable) {
current_thread = get_current_thread_handle ();
- if (_wapi_thread_apc_pending (current_thread))
+ if (_wapi_thread_cur_apc_pending ())
return WAIT_IO_COMPLETION;
}
while (TRUE) {
ret = clock_nanosleep (CLOCK_MONOTONIC, TIMER_ABSTIME, &target, NULL);
- if (alertable && _wapi_thread_apc_pending (current_thread))
+ if (alertable && _wapi_thread_cur_apc_pending ())
return WAIT_IO_COMPLETION;
if (ret == 0)
memset (&rem, 0, sizeof (rem));
ret=nanosleep(&req, &rem);
- if (alertable && _wapi_thread_apc_pending (current_thread))
+ if (alertable && _wapi_thread_cur_apc_pending ())
return WAIT_IO_COMPLETION;
if(ret==-1) {
gboolean
_wapi_thread_cur_apc_pending (void)
-{
- return _wapi_thread_apc_pending (get_current_thread_handle ());
-}
-
-gboolean
-_wapi_thread_apc_pending (gpointer handle)
{
WapiHandle_thread *thread;
- thread = lookup_thread (handle);
-
+ thread = lookup_thread (get_current_thread_handle ());
return thread->wait_handle == INTERRUPTION_REQUESTED_HANDLE;
}
* call the wait function again. This essentially means that the target thread will
* busy wait until it is ready to process the interruption.
*/
-void
-wapi_interrupt_thread (gpointer thread_handle)
-{
- gpointer wait_handle;
-
- wait_handle = wapi_prepare_interrupt_thread (thread_handle);
- wapi_finish_interrupt_thread (wait_handle);
-}
-
gpointer
wapi_prepare_interrupt_thread (gpointer thread_handle)
{