diff --git a/configure.ac b/configure.ac index 1a850808f8..4e61cc5d40 100644 --- a/configure.ac +++ b/configure.ac @@ -1029,7 +1029,7 @@ EFL_CHECK_GCC_BUILTIN([bswap64], [HAVE_BSWAP64]) AC_CHECK_FUNCS([fchmod]) -EFL_CHECK_FUNCS([EINA], [dlopen dladdr iconv shm_open splice setxattr getpagesize]) +EFL_CHECK_FUNCS([EINA], [dlopen dladdr iconv shm_open splice setxattr getpagesize prctl]) enable_log="no" if test "x${efl_func_fnmatch}" = "xyes" && test "x${want_log}" = "xyes" ; then diff --git a/m4/efl_check_funcs.m4 b/m4/efl_check_funcs.m4 index 39fb5ee5ad..b44f20bc55 100644 --- a/m4/efl_check_funcs.m4 +++ b/m4/efl_check_funcs.m4 @@ -288,6 +288,17 @@ sz = getpagesize(); ]]) ]) +dnl _EFL_CHECK_FUNC_PRCTL is for internal use +dnl _EFL_CHECK_FUNC_PRCTL(EFL, VARIABLE) +AC_DEFUN([_EFL_CHECK_FUNC_PRCTL], +[EFL_FIND_LIB_FOR_CODE([$1], [], [$2], [[ +#include +]], +[[ +prctl(PR_SET_TIMERSLACK, 1, 0, 0, 0); +]]) +]) + dnl Macro that checks function availability dnl dnl EFL_CHECK_FUNC(EFL, FUNCTION) diff --git a/src/lib/ecore/ecore_anim.c b/src/lib/ecore/ecore_anim.c index c069c96118..66432868d5 100644 --- a/src/lib/ecore/ecore_anim.c +++ b/src/lib/ecore/ecore_anim.c @@ -30,6 +30,10 @@ #endif /* ! _WIN32 */ +#ifdef HAVE_PRCTL +# include +#endif + #include "Ecore.h" #include "ecore_private.h" @@ -109,6 +113,9 @@ _timer_tick_core(void *data EINA_UNUSED, Ecore_Thread *thread) int ret; eina_thread_name_set(eina_thread_self(), "Eanimator-timer"); +#ifdef HAVE_PRCTL + prctl(PR_SET_TIMERSLACK, 1, 0, 0, 0); +#endif while (!ecore_thread_check(thread)) { DBG("------- timer_event_is_busy=%i", timer_event_is_busy); diff --git a/src/lib/ecore/ecore_exe_posix.c b/src/lib/ecore/ecore_exe_posix.c index 5ad60f9010..14c7d6963f 100644 --- a/src/lib/ecore/ecore_exe_posix.c +++ b/src/lib/ecore/ecore_exe_posix.c @@ -13,7 +13,7 @@ #include #include -#ifdef HAVE_SYS_PRCTL_H +#ifdef HAVE_PRCTL # include #endif @@ -1017,11 +1017,11 @@ _ecore_exe_exec_it(const char *exe_cmd, } } -#ifdef HAVE_SYS_PRCTL_H +#ifdef HAVE_PRCTL if ((flags & ECORE_EXE_TERM_WITH_PARENT)) - { - prctl(PR_SET_PDEATHSIG, SIGTERM); - } + { + prctl(PR_SET_PDEATHSIG, SIGTERM); + } #endif if (!(flags & ECORE_EXE_NOT_LEADER)) setsid(); diff --git a/src/lib/ecore_x/xlib/ecore_x_vsync.c b/src/lib/ecore_x/xlib/ecore_x_vsync.c index 436645e63c..ee43406ab5 100644 --- a/src/lib/ecore_x/xlib/ecore_x_vsync.c +++ b/src/lib/ecore_x/xlib/ecore_x_vsync.c @@ -17,6 +17,10 @@ #include #include +#ifdef HAVE_PRCTL +# include +#endif + #define ECORE_X_VSYNC_DRM 1 static Ecore_X_Window vsync_root = 0; @@ -286,6 +290,9 @@ _drm_tick_core(void *data EINA_UNUSED, Ecore_Thread *thread) int tick = 0; eina_thread_name_set(eina_thread_self(), "Eanimator-vsync"); +#ifdef HAVE_PRCTL + prctl(PR_SET_TIMERSLACK, 1, 0, 0, 0); +#endif while (!ecore_thread_check(thread)) { DBG("------- drm_event_is_busy=%i", drm_event_is_busy);