On Mon, 2 May 2011, Mike Blumenkrantz wrote:

> On Mon, 2 May 2011 07:01:36 +0200 (CEST)
> Vincent Torri <vto...@univ-evry.fr> wrote:
>
>>
>>
>> On Mon, 2 May 2011, Carsten Haitzler (The Rasterman) wrote:
>>
>>> On Sun, 1 May 2011 16:16:43 +0200 (CEST) Vincent Torri <vto...@univ-evry.fr>
>>> said:
>>>
>>>>
>>>>
>>>> On Sun, 1 May 2011, Enlightenment SVN wrote:
>>>>
>>>>> Log:
>>>>> oh dear. this new eina_lock thing is a bit of a mess isn't it now?
>>>>>  some fundamental errors there. don't go replacing pthread locks with
>>>>>  wrappers unless you know full well what u are doing. havnig threads
>>>>>  only work while "threads are initted" and then init/shtudown the thread
>>>>>  thing every time u spawn a thread.. is pretty silly. what if a thread
>>>>>  ends in the background WHILE u have a lock.. u try unlock.. u know
>>>>>  what ? your unlock DOES nothing. so you retain a lock. next time u
>>>>>  want to lock once a thread is around.. u have a deadlock issue.
>>>>>
>>>>>  even better - the checking if threads are initted and up is not
>>>>>  locked, so it can come up while it is being checked. more race
>>>>>  conditions. u need to clokc the init/shutdown AND lock the checking of
>>>>>  the value... and even then u STILl have problem #1 above. so that code
>>>>>  is now gone.
>>>>>
>>>>>  also trylock trturn inverse logic to the original pthread func and the
>>>>>  macros in evas that used it were not changed accordingly! aaagh!
>>>>>
>>>>>  i've also added backtrace debug ability to eina threads if compiled in
>>>>>  - u can get a bt of who last locked something. i had to do this just to
>>>>>  begin to grasp what on earth was going on. it's off by default.
>>>>>  also... the locks are error check locks to trylock can detect
>>>>>  deadlocks. speacil "2" return for now. better than a poke in the eye
>>>>>  with a sharp stick until we decide what to do. for now i hopew i have
>>>>>  killed this thread lock bug.
>>>>
>>>> can i try to mimic that to debug threads on Windows too ?
>>>
>>> do you have a working "backtrace". yes - gnu extensions. :) or you mean the
>>> deadlock detection thats in pthread for error check locks?
>>
>> For backtrace, I have that with vc++:
>>
>> http://msdn.microsoft.com/en-us/library/ff552119%28VS.85%29.aspx
>>
>> This function has already been used to capture the stack in Boost.
>>
>> Otherwise, with mingw, I think that I have backtrace().
>>
>> about deadlock, I don't know. I'm not very good with threads...
>>
>> Vincent
>>
>>>
>>>> Vincent
> Do you have something like helgrind/drd tools from valgrind that you can use 
> on
> Windows? That's probably what you would want to find an equivalent for
> debugging deadlocks.

valgrind does not work on Windows, but I have found some doc in MSDN

http://msdn.microsoft.com/en-us/library/ms810303.aspx

I'll check that later. i have other problems, with ecore_con :)

Vincent

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to