Commit Graph

23 Commits

Author SHA1 Message Date
Cedric BAIL a5fe2772c7 eina: add Eina_LockRW. more refactoring code comming.
SVN revision: 60628
2011-06-23 09:58:54 +00:00
Cedric BAIL bc0e734f93 eina: add eina_condition_timedwait.
SVN revision: 59819
2011-05-30 15:24:06 +00:00
Cedric BAIL 89b66a97b2 eina: ERROR_CHECK just make sense when you are debbuging lock usage.
SVN revision: 59811
2011-05-30 12:49:04 +00:00
Cedric BAIL 0351269adc eina: check condition is still alive when debugging threads.
SVN revision: 59299
2011-05-09 14:41:39 +00:00
Cedric BAIL 5f820ce976 eina: oops, need to protect inside #ifdef.
SVN revision: 59295
2011-05-09 13:06:03 +00:00
Cedric BAIL c73f0f9cf5 eina: improve lock debugging.
SVN revision: 59293
2011-05-09 12:54:47 +00:00
Cedric BAIL d2b65a51d0 eina: more check.
SVN revision: 59289
2011-05-09 10:42:42 +00:00
Cedric BAIL d20144bc9f eina: add Eina_Condition.
SVN revision: 59287
2011-05-09 10:32:56 +00:00
Cedric BAIL 25550183e0 eina: improve on/off and debugging lock.
Now if a lock is still taken when shutdown occur, you will know
where it come from !


SVN revision: 59191
2011-05-04 13:53:22 +00:00
Tom Hacohen 4a11dacf16 Eina lock: unused warning suppression is done with (void).
Not only that it's uglier doing mutex=0, but also new gcc started
complainig about it.

SVN revision: 59137
2011-05-02 18:19:41 +00:00
Cedric BAIL 5c2d05374c eina: use the right naming.
SVN revision: 59124
2011-05-02 13:51:20 +00:00
Cedric BAIL 691da73b84 eina: add back threads on/off support.
NOTE: only use it if you know what you are doing !


SVN revision: 59123
2011-05-02 13:40:28 +00:00
Cedric BAIL e5402b2eb2 eina: forgotten initialization.
SVN revision: 59121
2011-05-02 13:09:38 +00:00
Cedric BAIL 9140383045 eina: improve thread debugging and portability.
All thread debugging facility, including lock debug, on by turning --enable-debug-threads
at configure time of eina.

When threads check are disable, make sure that all lock/release are called
from the main loop only. And in all case, eina_lock_new/eina_lock_delete should be
called from the main loop.

Remove static initialization as it is not portable under Windows.



SVN revision: 59118
2011-05-02 11:25:35 +00:00
Carsten Haitzler 5061598e12 also return deadlock from normal lock (not try only)
SVN revision: 59103
2011-05-02 08:34:22 +00:00
Carsten Haitzler 651cff4602 formalise eina lock results to be equivalent to true/false with added
deadlock for try.



SVN revision: 59101
2011-05-02 08:24:06 +00:00
Carsten Haitzler 234f0a4659 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.




SVN revision: 59085
2011-05-01 13:24:08 +00:00
Cedric BAIL 6692daabc3 eina: fix eina_lock on windows.
SVN revision: 58893
2011-04-25 08:48:20 +00:00
Carsten Haitzler 3090b681a8 lets compile again shall we?
SVN revision: 58883
2011-04-25 02:30:42 +00:00
Cedric BAIL 3abc9015d4 eina: put global into namespace and add lock abort
SVN revision: 58875
2011-04-24 20:22:17 +00:00
Cedric BAIL bd1337f4cd eina: fix api to actually work as expected.
SVN revision: 58871
2011-04-24 16:49:48 +00:00
Cedric BAIL f7d9487aff eina: starting to use eina_lock.
SVN revision: 58869
2011-04-24 15:54:09 +00:00
Vincent Torri 6e8d19b150 Eina: Add Eina_Lock API
Eina_Lock API is a small set of functions to manage in a
cross platform way mutual exclusion objects



SVN revision: 58835
2011-04-22 21:26:36 +00:00