hello,

On Mon, May 30, 2011 at 2:31 PM, WooHyun Jung <wh0705.j...@samsung.com> wrote:
> If I include "pthread.h" first and then "Elementary.h", following error
> message is shown. (__USE_UNIX98 = 0)
>
> /usr/include/eina-1/eina/eina_inline_lock_posix.x:101:41: error:
> 'PTHREAD_MUTEX_ERRORCHECK' undeclared (first use in this function)
>
> Should eina_inline_lock_posix.x file be modified as below ?
>
> #ifdef __USE_UNIX98
>
>      if (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK) != 0)
>
>        return EINA_FALSE;
>
> #else
>
>      if (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK_NP) !=
> 0)
>
>        return EINA_FALSE;
>
> #endif

The issue is in fact more related with double inclusion of pthread.h.
And we don't have a real proper work around. I move that piece of code
to be used only in debug mode. We could as suggested on irc add
-D__USE_UNIX98 in the CFLAGS of eina pkgconfig file.

In general, eina should provide all the portable layer for mutex and
ecore the layer to sanely manipulate threads. So at the ends, we
should not use pthread.h directly in an EFL apps. Right now, I know
that it's not completly the case as some feature are still needed. But
if you can identify what are the feature that would be usefull first,
I am interested to know.
-- 
Cedric BAIL

------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to