use new spinlock detection

SVN revision: 44718
This commit is contained in:
Vincent Torri 2009-12-25 11:30:41 +00:00
parent ebed5f4dab
commit 0fda2ab7c8
2 changed files with 7 additions and 10 deletions

View File

@ -50,14 +50,11 @@ EFL_CHECK_CPU_SSE([have_sse="yes"], [have_sse="no"])
EFL_CHECK_CPU_SSE2([have_sse2="yes"], [have_sse2="no"])
EFL_CHECK_CPU_ALTIVEC([have_altivec="yes"], [have_altivec="no"])
EFL_CHECK_PTHREAD([have_pthread="yes"], [have_pthread="no"])
if test "x${have_pthread}" = "xyes"; then
AC_CHECK_LIB(pthread, pthread_spin_init,
[
AC_DEFINE(EINA_PTHREAD_SPIN, 1, [Build eina_log lock using pthread_spin])
])
fi
EFL_CHECK_PTHREAD(["yes"],
[have_pthread="yes"],
[have_pthread="no"],
[have_pthread_spinlock="yes"],
[have_pthread_spinlock="no"])
### Additional options to configure
@ -479,7 +476,7 @@ echo " Safety checks........: ${have_safety_checks}"
echo " Maximum log level....: ${with_max_log_level}"
echo " Report string usage..: ${have_stringshare_usage}"
echo " Default mempool......: ${have_default_mempool}"
echo " Thread Support.......: ${have_pthread}"
echo " Thread Support.......: ${have_pthread} (spinlock: ${have_pthread_spinlock})"
echo " Amalgamation.........: ${do_amalgamation}"
echo
echo " Documentation........: ${build_doc}"

View File

@ -375,7 +375,7 @@ static pthread_t _main_thread;
} \
} while (0)
#ifdef EINA_PTHREAD_SPIN
#ifdef EFL_HAVE_PTHREAD_SPINLOCK
static pthread_spinlock_t _log_lock;
#define LOG_LOCK() \
if(_threads_enabled) \