Eina : eina_sched.c : simpler code on Windows
authorcaro <caro>
Wed, 1 Jun 2011 06:12:55 +0000 (06:12 +0000)
committercaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 1 Jun 2011 06:12:55 +0000 (06:12 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eina@59856 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/eina_sched.c

index 45fcc00..8c7f7fe 100644 (file)
@@ -85,21 +85,8 @@ eina_sched_prio_drop(void)
      }
 # endif
 #elif defined EFL_HAVE_WIN32_THREADS
-   HANDLE thread;
-
-   thread = OpenThread(THREAD_SET_INFORMATION,
-                      FALSE,
-                      GetCurrentThreadId());
-   if (!thread)
-     {
-       EINA_LOG_ERR("Can not open current thread");
-       return;
-     }
-
-   if (!SetThreadPriority(thread, THREAD_PRIORITY_BELOW_NORMAL))
+   if (!SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_BELOW_NORMAL))
      EINA_LOG_ERR("Can not set thread priority");
-
-   CloseHandle(thread);
 #else
    EINA_LOG_ERR("Eina does not have support for threads enabled"
                 "or it doesn't support setting scheduler priorities");