[io-layer] Remove _wapi_thread_apc_pending function
[mono.git] / mono / io-layer / wthreads.c
index 98a932b7e259eaf09de77597a67e5ebd8b2b6ae9..aff4e8f4662db4f4733fffc22d356bf86057eac0 100644 (file)
@@ -243,7 +243,7 @@ SleepEx (guint32 ms, gboolean alertable)
        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;
        }
        
@@ -271,7 +271,7 @@ SleepEx (guint32 ms, gboolean alertable)
        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)
@@ -288,7 +288,7 @@ again:
        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) {
@@ -315,17 +315,10 @@ Sleep(guint32 ms)
 
 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;
 }
 
@@ -341,15 +334,6 @@ _wapi_thread_apc_pending (gpointer 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)
 {