Commit Graph

222 Commits

Author SHA1 Message Date
Cedric Bail 0aa77d7dde eina: use Eina_Spinlock in Eina_Stringshare instead of Eina_Lock. 2013-10-11 11:08:17 +09:00
Cedric Bail 82d86ea42d eina: use Eina_Spinlock for Eina_Log. 2013-10-11 11:08:17 +09:00
Cedric Bail 1b07350a46 eina: add Eina_Spinlock API. 2013-10-11 11:08:17 +09:00
Cedric Bail fe25608edd eina: handle more compiler strangeness for bswap.
So current order is :
- __builtin_bswap*() for compiler that provide it
- _byteswap_*() for MSVC
- bswap_*() for older Linux and some BSD
- own C code when everything else fall appart.

The reason for this order is that the builtin will always generate
the best assembly possible. On my system bswap_*() are not changing
in all version to the best solution as they are almost equivalent to
the C macro.
2013-10-04 12:49:02 +09:00
Cedric Bail d52f825de6 eina: in case of an error we should exit not continue and manipulate dead data.
This should fix a warning catched by LLVM/Clang.
2013-10-04 10:56:05 +09:00
ChunEon Park 18be4c50d9 eina/eina_file - fix eina_file_map_lines() to not drop of one character in the last line. 2013-10-04 01:58:35 +09:00
Cedric Bail ff3d2a68d5 eina: add infrastructure to handle more CPU and compiler builtin information. 2013-10-02 20:54:50 +09:00
Tom Hacohen de6f57fac0 Eina inlist: Removed redundant if in EINA_INLIST_FOREACH_SAFE.
If it is not NULL, so will EINA_INLIST_GET. As that returns a pointer to an
area after it.
2013-09-30 14:28:38 +01:00
Cedric Bail 295babadb1 eina: check if the complete hash match before checking if the key match during children walk.
This give an interesting +15% for all Eina_Hash user whatever hash function they use. The inlined
djb2 is still the fastest one and all other give very close result.

This idea was given by Lucas De Marchi's blog :
http://www.politreco.com/2013/09/optimizing-hash-table-with-kmod-as-testbed/

I do believe that rolling a crc32 implementation as a hash function should give interesting result
in our test.
2013-09-26 15:51:25 +09:00
Lucas De Marchi ad76ce025c Revert "eina: add functions to alloc strings from a printf fmt"
This reverts commit b5fce696c7 and fixes
to NEWS and @since that came later.

These functions are pretty trivial and their functionality can be
obtained with asprintf() and snprintf. The first is not available only
on windows, but there's an implementation for that one on Evil, that
should be used instead.
2013-09-25 22:51:03 -03:00
Tae-Hwan Kim 54551defa6 eina: add EINA_INLIST_REVERSE_FOREACH_FROM. 2013-09-25 18:29:23 +09:00
Cedric Bail a7fe49139d eina: fix @since to be a proper revision number. 2013-09-24 15:03:24 +09:00
Jorge Zapata b5fce696c7 eina: add functions to alloc strings from a printf fmt 2013-09-24 12:20:27 +09:00
Jorge Zapata b98ee971f3 eina: add a substraction in rectangles and more helpers
Also add functions to cut a rectangle in the different
lengths/coordinates.
Add helper macros to printf a rectangle
2013-09-24 12:20:27 +09:00
Jorge Zapata 538821f09d eina: add double_from/to and helper defines in f16p16 2013-09-24 12:20:27 +09:00
Carsten Haitzler c1556b7112 eina - remove deadlock from share-common + remove extra lock/unlock 2013-09-08 10:03:35 +09:00
Carsten Haitzler f2885306dc eina - stringshare - strlen already would deal with optimization cases 2013-09-05 12:46:06 +09:00
Cedric Bail d7c8d221b0 eina: forgotten lock, thanks coverity. 2013-09-03 12:58:51 +09:00
Cedric Bail caf934e005 eina: don't try close dummy handle. 2013-09-02 12:33:21 +09:00
Cedric Bail 64823141f6 eina: fix typo and use the right refcount. 2013-09-02 11:16:59 +09:00
Jean-Philippe Andre deacfdce24 eina: Fix invalid check on Eina_File::global_map
global_map is set to MAP_FAILED in case of error after mmap.
So, it is initialized to MAP_FAILED and considered valid
otherwise.

So, we don't want to set the map to NULL or even check again NULL.
2013-08-27 17:31:12 +09:00
Daniel Juyung Seo a7399da8f6 Eina.h: bump up year. 2013-08-20 03:11:48 +09:00
Cedric Bail d72239a118 eina: remove a warning. 2013-08-12 12:11:56 +09:00
Cedric Bail 861823848a eina: change eina_file_virtualize to be able to provide a fake name. 2013-08-09 20:50:54 +09:00
Carsten Haitzler fb3159c48e eina module - minor addition ot allowing lazy loading if env var set 2013-08-08 20:18:08 +09:00
Cedric Bail 464c58a1c9 eina: another fix for windows build. 2013-08-08 17:17:58 +09:00
Cedric Bail c4beec0127 eina: fix compilation of Eina_File on windows. 2013-08-08 17:05:14 +09:00
Carsten Haitzler bdb19cd974 eina-file - adapt to bsd version of MADV_REMOVE 2013-08-06 16:13:03 +09:00
Cedric Bail c90179ce86 eina: fix build on FreeBSD. 2013-08-06 15:44:22 +09:00
Chris Michael a97f3c0b9b Fix eina_file_virtual_map_new function (/me glares at Frenchie).
- Spank Cedric !!!!!

NB: How about we actually fill in "map" after allocation ??

NB: Previously we would malloc "map" and immediately exit without
filling it in, without adding it to the hash....nothing. Just allocate
and get out. Bad Frenchie !!!

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-05 13:01:52 +01:00
Cedric Bail 4dd259f3b1 eina: add eina_file_refresh(). 2013-07-31 17:16:40 +09:00
Cedric Bail f2de8970a1 eina: add support for in memory only Eina_File. 2013-07-31 11:51:51 +09:00
Cedric Bail fa57dd8b2a eina: seems like all the compiler we support do support __typeof__. 2013-07-29 16:28:07 +09:00
Ryuan Choi f6ba1f69e7 eina: use __typeof__ for public headers to build applications with c++0x. 2013-07-26 14:00:16 +09:00
Carsten Haitzler a8e80514dc fix clang bad free complaint to deal with data magic value 2013-07-16 18:11:50 +09:00
Cedric Bail 9d2249c1a8 eina: fix Eina_Log restart. 2013-07-15 17:04:34 +09:00
Daniel Juyung Seo fe914c069c eina_stringshare.h: added more description to eina_stringshare_add_length(). 2013-07-15 13:39:57 +09:00
Cedric Bail f07d4c17e9 eina: add eina_tiler_empty. 2013-07-11 14:01:06 +09:00
Cedric Bail 5479da04b6 eina: Eina_Tiler formatting. 2013-07-11 14:01:06 +09:00
Cedric Bail d2b94729bc eina: don't insert the same rectangle multiple time in a row. 2013-07-11 14:01:06 +09:00
Cedric Bail 2e347b5e22 eina: let's not complain for nothing. 2013-07-11 14:01:06 +09:00
Chris Michael a144495daa Initialize 'd' to -1 so we can check on 'end' if it needs closing
Signed-off-by: Chris Michael <devilhorns@comcast.net>
2013-07-08 16:05:12 +01:00
Chris Michael 2aa12782b6 If we open a file for copying, then we should also Close that file
when the copy is done.

NB: Fixes Coverity CID1039181

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 11:13:56 +01:00
Mike Blumenkrantz b8e16b8f4a +eina_tiler_area_size_get
also fix docs for eina_tiler_area_size_set
2013-07-08 09:08:04 +01:00
Carsten Haitzler d15d86e26f eina: add eina_file_map_populate() 2013-07-06 22:01:23 +09:00
Cedric Bail 0453cd16b4 eina: revert that simplification as compiler are now to dumb to handle it. 2013-07-05 14:59:43 +09:00
Cedric Bail f825bebcdb eina: improve Eina_Tiler to be in par with Evas_Tilebuf. 2013-07-04 13:02:48 +09:00
Stefan Schmidt 9c1ed31c76 eina_list: Avoid NULL pointer deref in eina_list_shuffle.
If we have a valid but empty, n = 0, list we never enter the loop
and shuffled_last might still be NULL. Avoid this case by checking
explicitly for n = 0 before.
2013-06-25 15:18:33 +01:00
Sebastian Dransfeld 336f6ec328 efl: formatting 2013-06-20 13:28:18 +02:00
Sebastian Dransfeld 068f1ddc62 efl: formatting 2013-06-20 13:08:36 +02:00