forked from enlightenment/efl
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:
parent
b5dfed45d8
commit
6666a9e795
|
@ -20,7 +20,7 @@
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef EFL_HAVE_THREADS
|
#ifdef EFL_HAVE_POSIX_THREADS
|
||||||
# include <pthread.h>
|
# include <pthread.h>
|
||||||
# ifdef __linux__
|
# ifdef __linux__
|
||||||
# include <sched.h>
|
# include <sched.h>
|
||||||
|
@ -30,6 +30,7 @@
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "eina_sched.h"
|
||||||
#include "eina_log.h"
|
#include "eina_log.h"
|
||||||
|
|
||||||
#define RTNICENESS 5
|
#define RTNICENESS 5
|
||||||
|
@ -50,7 +51,7 @@
|
||||||
EAPI void
|
EAPI void
|
||||||
eina_sched_prio_drop(void)
|
eina_sched_prio_drop(void)
|
||||||
{
|
{
|
||||||
#ifdef EFL_HAVE_THREADS
|
#ifdef EFL_HAVE_POSIX_THREADS
|
||||||
struct sched_param param;
|
struct sched_param param;
|
||||||
int pol, prio, ret;
|
int pol, prio, ret;
|
||||||
pthread_t pthread_id;
|
pthread_t pthread_id;
|
||||||
|
@ -88,6 +89,7 @@ eina_sched_prio_drop(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#else
|
#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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue