Commit Graph

76 Commits

Author SHA1 Message Date
Cedric BAIL 5d72c686c7 eina: make it possible to force the number of detected CPU as way to overcome local bug.
SVN revision: 70328
2012-04-19 09:25:54 +00:00
Carsten Haitzler 8bce681d16 and fully de-modelify eina
SVN revision: 70293
2012-04-18 09:19:47 +00:00
Cedric BAIL 6f6e4a4570 eina: improve debugging message.
SVN revision: 69896
2012-04-03 13:28:04 +00:00
Vincent Torri f00cf44117 Eina: fix shm_open() check (can be in libc or librt) + various autotools cleaning
This works in linux and windows, and should fix shm_detection on BSD (including Mac)

BSD, Mac and solaris users : please check that it compiles and shm_open is detected


SVN revision: 69608
2012-03-25 11:12:32 +00:00
Gustavo Sverzut Barbieri 7c0357ddeb welcome eina_model.
This is a simple to use generic hierarchical data access. It includes
properties, children, reference counting and notifications (callbacks).

It can be understood in the same lines as GObject or PyObject, but I
believe the best usage is just to provide data models, not generic
Object Oriented Programming in C.

It misses most of documentation, although the important bits are
there. Need help here :-/



SVN revision: 67405
2012-01-21 01:30:09 +00:00
Gustavo Sverzut Barbieri 7a4e904566 add eina_value.
eina value is a generic value storage, it's quite efficient to space
(16 bytes) and speed (inlines for basic types).

It's basically a structure describing how to manage memory
(Eina_Value_Type), with default implementation for char, short, int,
long, int64_t (and unsigned variants), float, double, stringshare and
string.

If a type 'value_size' is smaller than 8 bytes, it's stored
inline. Otherwise a value is allocated and managed.

Most of the methods are inline, with special handling for char, short,
int... Then no extra calls are made, allowing the compiler to optimize
them.

For array of a single type it is recommend to use Eina_Value_Array, as
it will efficiently store and access members (just a char if subtype
is EINA_VALUE_TYPE_CHAR, etc).

It can copy itself, compare itself. Including arrays.

It would be nice to have something that converts between EET and this.



SVN revision: 67035
2012-01-11 02:20:26 +00:00
Gustavo Sverzut Barbieri 45b07ed02d add eina_inarray.
It is an inline array, that is, the members are actually in the
allocated buffer, as opposed to a pointer to its data.

It can be used to manage array of integers, floats or other structures
without fragmenting memory.

The lookups should be fast as memory is linear, then CPU prefetch can
kick in and bring data to cache before it's used.



SVN revision: 67003
2012-01-09 23:24:18 +00:00
Cedric BAIL ae86b8203f eina: reorder init as eina_error need eina_stringshare.
SVN revision: 66383
2011-12-20 11:00:59 +00:00
Cedric BAIL 6d9d15423a eina: don't hide symbol if we can build them in.
SVN revision: 64762
2011-11-05 14:01:18 +00:00
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