On Sun, May 15, 2011 at 12:16 PM, Vincent Torri <[email protected]> wrote:
> On Sun, 15 May 2011, Cedric BAIL wrote:
>> On Sat, May 14, 2011 at 10:49 PM, Vincent Torri <[email protected]>
>> wrote:
>>> some questions:
>>>
>>>  * is it normal that in eina_condition_free(), the mutex is not destroyed
>>> ?
>>
>> Yes. It's only a link to the real mutex, not a copy. I am thinking
>> about adding refcounting in debug mode to be sure that mutex still
>> exist and is alive for all condition that use it (and of course giving
>> a warning if it's not).
>
> ok
>
>>>  * in eina_lock_take()
>>>
>>> #ifdef EINA_HAVE_ON_OFF_THREADS
>>>    if (!_eina_threads_activated)
>>>      {
>>> #ifdef EINA_HAVE_DEBUG_THREADS
>>>         assert(pthread_equal(_eina_main_loop, pthread_self()));
>>> #endif
>>>         return EINA_LOCK_SUCCEED;
>>>      }
>>> #endif
>>>
>>> is it normal to return EINA_LOCK_SUCCEED here ?
>>
>> Yes, because it's not a failure. It doesn't say it took the lock, it
>> is saying it didn't fail.
>
> so the code in the win32 part
>
>
> static inline Eina_Lock_Result
> eina_lock_take(Eina_Lock *mutex)
> {
> #ifdef EINA_HAVE_ON_OFF_THREADS
>   if (!_eina_threads_activated) return EINA_LOCK_FAIL;
> #endif
>
> is wrong, right ? I ask because before the last change, EINA_FALSE was
> returned

Yes, it's wrong.
-- 
Cedric BAIL

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to