Commit Graph

67 Commits

Author SHA1 Message Date
Mike McCormack 3331e39a8f eina: Only declare _eina_tracking_lock with thread debugging
Hopefully fixes compilation on windows

Signed-off-by: Mike McCormack <mj.mccormack@samsung.com>

SVN revision: 63905
2011-10-07 05:56:51 +00:00
Mike McCormack d1bfb51324 Revert "[Eina] Use Eina_Lock and not pthread. Fix compilation on Windows."
SVN revision: 63877

Reverted due to the following build failure:

eina_main.c:117:16: error: conflicting types for ‘_eina_tracking_lock’
../../src/include/eina_inline_lock_posix.x:83:29: note: previous declaration of ‘_eina_tracking_lock’ was here
make[3]: *** [libeina_la-eina_main.lo] Error 1

_eina_tracking_lock is used for implementation of Eina_Locks, so cannot be an Eina_Lock

Signed-off-by: Mike McCormack <mj.mccormack@samsung.com>

SVN revision: 63904
2011-10-07 05:56:43 +00:00
Vincent Torri 32c2ed673b [Eina] Use Eina_Lock and not pthread. Fix compilation on Windows.
SVN revision: 63877
2011-10-06 06:34:39 +00:00
Cedric BAIL 7efc00819a eina: prevent ABI break when turning on/off threads debugging.
SVN revision: 63788
2011-10-04 02:33:00 +00:00
Carsten Haitzler 495f658861 support mtrace in eina at runtime. easier now to enable via env vars.
SVN revision: 63498
2011-09-20 11:28:25 +00:00
Vincent Torri 2b7649e676 add sys/types.h check
SVN revision: 63455
2011-09-18 10:13:29 +00:00
Gustavo Sverzut Barbieri 32110747c9 eina_prefix: use log infrastructure.
use eina_log instead of weirdo printfs... multiple levels, greatness
everywhere... helped me debug emotion's warning.

It is always a pain to try to use library log and notice they are not
using their own standards :-/

   export EINA_LOG_LEVELS=eina_prefix:4





SVN revision: 63108
2011-09-03 05:31:25 +00:00
Vincent Torri bdde82fda3 fix main loop stuff on Windows
SVN revision: 62864
2011-08-26 16:13:29 +00:00
Cedric BAIL 1ec7bacc52 eina: add eina_main_loop_define.
Do not use it.


SVN revision: 62530
2011-08-17 09:42:43 +00:00
Cedric BAIL fb56b5f5e3 eina: add generic macro to generate error when outside of the main loop.
SVN revision: 62240
2011-08-09 08:48:57 +00:00
Cedric BAIL 9838bda52f eina: detect main loop for windows to.
SVN revision: 62239
2011-08-09 08:47:57 +00:00
Cedric BAIL bfa83a2ff5 eina: correct guard of thread code.
SVN revision: 62238
2011-08-09 08:46:29 +00:00
Cedric BAIL 811b050ee8 eina: better implementation.
SVN revision: 61900
2011-07-29 15:37:39 +00:00
Cedric BAIL 2b574523d2 eina: add eina_main_loop_is.
SVN revision: 61896
2011-07-29 14:56:42 +00:00
Cedric BAIL 83c3a1a0fb eina: check pending lock at the right time.
SVN revision: 59286
2011-05-09 10:29:55 +00:00
Cedric BAIL b4f8d80b02 eina: remove useless lock.
SVN revision: 59233
2011-05-06 09:07:26 +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
Cedric BAIL a345a670b2 eina: make sure eina_threads_init/eina_threads_shutdown are correctly called.
SVN revision: 59117
2011-05-02 11:20:00 +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
Cedric BAIL 8a8153bf2d eina: add Eina_File API.
NOTE: the purpose of this API is to replace mmap user in the
EFL, share cache and more code across them. The potential user
are eet, evas, efreet, eio and enlil. More patch are needed for
them to use this infra. Help welcome :-)

NOTE2: this API also need more test and is waiting for some
more pthread infra before being thread safe. But at the end
it will be thread safe if eina thread safety is requested.


SVN revision: 58637
2011-04-13 16:15:30 +00:00
Carsten Haitzler 57dbcaaaa2 more doxy -> .h
SVN revision: 58434
2011-04-07 12:38:55 +00:00
Cedric BAIL 30fda98e76 eina: add Eina_Simple_Xml parser by Gustavo.
TODO: fix docs (but today, eina doc need some love again)
      use iconv and handle encoding (can get entity-to-utf8 from evas)
      description of what to do at :
http://marc.info/?l=enlightenment-devel&m=129975452006699&w=3

NOTE: this mean this API is not stable yet and will be broken soon.


SVN revision: 58387
2011-04-06 10:14:03 +00:00
Cedric BAIL 0d02671e99 * eina: improve chained mempool speed.
By removing pthread lock when thread safety is not required.
	By not walking over the buffer for nothing.


SVN revision: 53310
2010-10-12 16:53:30 +00:00
Lucas De Marchi c4a0cef6e6 Fix typos in docs
* eina_thread_init doesn't exist. eina_threads_init it is;
* 'mutexes' is a more common spelling, not 'mutexs'



SVN revision: 52136
2010-09-10 12:01:52 +00:00
Vincent Torri 333b64f15e some doc fixes
SVN revision: 51242
2010-08-17 06:58:26 +00:00
Mike Blumenkrantz c09c5ed690 and these
SVN revision: 50961
2010-08-10 12:05:51 +00:00
Mike Blumenkrantz 6bc0a6cb14 errr use the right define for this
SVN revision: 50952
2010-08-10 03:37:21 +00:00
Mike Blumenkrantz 56a0bd9396 implement threadsafety for arrays, alter all eina internal array usage to (hopefully) be threadsafe
call eina_threads_init() to enable this if you have pthread rwlock support (posix 2001)
note some function prototypes have lost const on array params to allow locking
WARNING: you should NOT call eina_threads_shutdown unless you are positive that you will not use any arrays which were created while threadsafe mode were enabled, and vice versa.  Failing to adhere to this warning WILL result in either deadlocks or memory leaks.


SVN revision: 50951
2010-08-10 03:26:15 +00:00
Mike Blumenkrantz a124fffeca start binshare
SVN revision: 50581
2010-07-28 03:33:49 +00:00
Carsten Haitzler ddc6ba2c2a uncrustify eina.
SVN revision: 50573
2010-07-28 02:37:05 +00:00
Tom Hacohen 279da003e0 Eina: Added Eina_UStrbuf.
Same as Eina_Strbuf but for Eina_Unicode strings.

SVN revision: 50534
2010-07-27 09:05:41 +00:00
Tom Hacohen 3675a5f02b Eina: Add Eina_UStringshare and Eina_Binshare.
Also modified Eina_Stringshare to share most of the code with the two above.
Added Magics for Eina_UStrbuf as well as for UStringshare/Binshare.

SVN revision: 50533
2010-07-27 08:55:23 +00:00
Vincent Torri c97a897584 use Win32 native mutex on Windows. To use it, pass the following option
to configure:

--enable-win32-threads

By default, pthreads are used


SVN revision: 50220
2010-07-13 13:51:00 +00:00
Carsten Haitzler 9b41314165 remove semi-colon
SVN revision: 49272
2010-05-29 06:28:38 +00:00
Carsten Haitzler 02503dd152 eina gets version thing ala eet.
SVN revision: 49267
2010-05-29 03:05:04 +00:00
Cedric BAIL 9367b5f7c7 * eina: Add first version of a Quad Tree data type.
NOTE: consider the API experimental and subject to change.


SVN revision: 48424
2010-04-29 17:21:14 +00:00
Vincent Torri c76d3cea37 remove useless semicolon
SVN revision: 48015
2010-04-15 06:28:22 +00:00
Vincent Torri 4da59fea04 fix header inclusion
SVN revision: 45655
2010-01-28 10:03:31 +00:00
Sebastian Dransfeld c6ca24216c Add EINA_MAGIC to strbuf
SVN revision: 45651
2010-01-27 20:48:27 +00:00
Vincent Torri 04a156cda0 useless variable if pthread is not used
SVN revision: 44319
2009-12-09 08:34:09 +00:00
Jonathan Atton 4bfc091f41 Eina : add a prefix to STRINGSHARE_LOCK and LOG_LOCK
SVN revision: 43399
2009-11-01 20:09:26 +00:00
Jonathan Atton 6ea6dc0856 Eina : now eina stringshare is thread safe if eina_threads_init() is called. Eina log which was thread safe is now thread safe only if the previous functions is called
SVN revision: 43398
2009-11-01 19:50:18 +00:00
Gustavo Sverzut Barbieri 8318f4c1f2 allow amalgamation of files, at least symbols don't clash anymore.
more related to amalgamation later.



SVN revision: 42312
2009-09-07 04:23:05 +00:00
Gustavo Sverzut Barbieri 404e3e09fb API BREAK: eina_magic_string_set() does not change existing strings anymore.
It's pointless to be able to change magic number string after it's
created, so let's avoid walking the existing list and just remove
places where strings were being duplicated (list/array both inited
magic strings for accessor/iterators).

Also an optimization, register using an array and sort it before
searching. Sort will just happen when array was changed, and this is
just done when eina_magic_string_get() is called.




SVN revision: 42310
2009-09-07 02:33:54 +00:00
Gustavo Sverzut Barbieri e4af7c100c EINA API BREAK: no more individual modules init/shutdown.
Being able to indivually initialize individual modules was initially
"good", but at end it's putting complexities on users that would try
to "optimize" by doing just what they used, but in the end most people
would get them wrong, users would have to do lots of code and etc. At
the end it does not worth.

Most module init just register handful errors and log domains, so are
cheap. The exception is mempool users, that would dlopen() stuff, but
people that are concerned (embedded) can just compile those statically
in eina.

Since at the end any real application would use most of modules, we
actually end saving lots of function calls that would do nothing other
than increment a global counter.

I also did the init/shutdown use an array, making it easier to
maintain. The inital dependencies were analysed by a script I wrote, I
hope it's all right.

Please fix any breakages you find!



SVN revision: 42300
2009-09-06 22:21:56 +00:00
Gustavo Sverzut Barbieri 643958705b eina_matrixsparse: welcome sparse matrix implementation and tests.
Sparse Matrix was implemented and tested by Rafael Antognolli and
myself in order to implement optimized large sparse matrix walk in
some products, one of them WebKit-EFL optimizations.

We have done extensive tests, with good code coverage. Similar to
lists/inlists, we keep pointer to last known element and similar to
iterators we keep reference to last accessed row and cell inside
rows. This allows fast sequential access (for i... for j... m[i,j]),
that is our most common usage case.

Rows are kept in a list, with cells inside that row as another
list. It's not similar to most book implementations where cells keep
reference to their sibling cells in other rows as well, we opted to
not do that to save some pointers and make algorithms simpler, still
do great for our use case.

This code was developed on behalf of our client, that wants to remain
unnamed so far. Thanks client ;-)



SVN revision: 42243
2009-09-04 13:43:44 +00:00
Gustavo Sverzut Barbieri ecbff0cb75 loggify main.
SVN revision: 42222
2009-09-04 01:48:36 +00:00
Gustavo Sverzut Barbieri 07d2bde900 eina_safety_checks_init()
All these individual init functions are getting messy, some modules
lack them and it's easy to get inconsistent. Safety check needs error
and log, but these need safety checks as well, some modules (lalloc,
rbtree and others) use safety checks but provide no _init().

I want to know if we really gain something to init individual
modules. It should not be that expensive as init should not allocate
heavy resources and the recommendation is to call eina_init() so most
users will do that anyway.

If people agree I'll unmark all *_init() as EAPI and make them private
to eina lib.



SVN revision: 42214
2009-09-04 00:53:19 +00:00