Exclude win from prio drop implementation

Win will use another completely different approach. So, change the
guards to EFL_HAVE_POSIX_THREADS.

Also, include eina_sched.h as should have been done.



SVN revision: 52654
This commit is contained in:
Lucas De Marchi 2010-09-23 20:58:19 +00:00
parent b5dfed45d8
commit 6666a9e795
1 changed files with 5 additions and 3 deletions

View File

@ -20,7 +20,7 @@
# include "config.h"
#endif
#ifdef EFL_HAVE_THREADS
#ifdef EFL_HAVE_POSIX_THREADS
# include <pthread.h>
# ifdef __linux__
# include <sched.h>
@ -30,6 +30,7 @@
# endif
#endif
#include "eina_sched.h"
#include "eina_log.h"
#define RTNICENESS 5
@ -50,7 +51,7 @@
EAPI void
eina_sched_prio_drop(void)
{
#ifdef EFL_HAVE_THREADS
#ifdef EFL_HAVE_POSIX_THREADS
struct sched_param param;
int pol, prio, ret;
pthread_t pthread_id;
@ -88,6 +89,7 @@ eina_sched_prio_drop(void)
}
#endif
#else
EINA_LOG_ERR("Eina does not have support for threads enabled");
EINA_LOG_ERR("Eina does not have support for threads enabled"
"or it doesn't support setting scheduler priorities");
#endif
}