Commit Graph

1079 Commits

Author SHA1 Message Date
Shinwoo Kim bb5f4aa857 eina_tiler: fix typo of rect comparing 2018-02-05 20:02:06 +09:00
Vincent Torri 78af66ffb4 Eina: ignore EINA_FILE_LNK on Windows 2018-01-30 16:52:24 +09:00
Bryce Harrington 7f43866707 eina: Cleanup grammar in eina_hash doxygen
Summary:
Corrects some grammatical errors, and rephrases wording of some passages
for better clarity.  Also fix a few doxygen formatting inconsistencies.

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5764
2018-01-30 14:42:35 +09:00
Derek Foreman 3e230693e6 eina_module: Drop ridiculous ERR messages from module_list_load/unload
The documentation for these functions claims that passing a NULL array
results in doing nothing - that should also include logging nothing.

EINA_SAFETY_ON_NULL_RETURN() logs an ERR message and should be reserved
for usage when NULL is not actually a valid state.

Additionally, it's entirely possible to turn off EINA_SAFETY_CHECKS, at
which point these functions would stop behaving as the documentation
says they do.  Not great.
2018-01-26 15:54:00 -06:00
Bryce Harrington 692136202f eina: Make return doxygen consistent
Summary:
Ensure @return defines error returns consistently.  In several cases the
errors were explained in the body but not mentioned in the @return docs.

Drop redundant return value documentation for clarity.  Some routines
were defining the return values both in @return and in the doxygen body.

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5756
2018-01-24 11:35:01 +09:00
Bryce Harrington 77dc9ab874 eina: Clarify that Eina_Matrix_Type can describe any matrix
Summary:
The Eina_Matrix_Type enum is returned by eina_matrix4_type_get and
eina_matrix2_type_get; it is not Matrix3-specific.  Update doxygen
accordingly.

Reviewers: devilhorns

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5744
2018-01-18 08:19:08 -05:00
Bryce Harrington 5f59a76587 eina: Cleanup spelling/grammar/punctuation for Eina List
Summary:
This fixes some typos and misspellings, massages grammar in a few
places, tidys up a little whitespace, and fixes incorrect docs in a spot
or two.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5745
2018-01-18 08:16:52 -05:00
Vincent Torri f5b01ac5ce all: Simplify definition of EAPI
This will help in the transition from Autotools to Meson. This has been
tested on Windows for which EFL_XXX_BUILD were first introduced.
2018-01-18 18:04:03 +09:00
Cedric BAIL 1af649d57b eina: make updating rectangle cache thread safe. 2018-01-16 09:54:04 -08:00
Jean Guyomarc'h 34d9f20706 eina: remove usless newline
Summary:
ecore_evas: remove debug

eina: unregister log level when done with

Fixes a constant memory leak.

eina: introduce EINA_HOT and EINA_COLD

These attributes respectivelly expand to __attribute__ ((hot)) and
__attribute__ ((cold)) when available. They allow to mark functions are
being hot/cold (frequently used or not) as well as to qualify labels
within a function (likely/unlikely branches).

eo: speed-up generated calls by removing call cache

The call cache needed to by thread-local, to avoid concurrency issues.
Problem with TLS is that is adds an extra overhead, which appears to be
greater than the optimization the cache provides.

Op is naturally atomic, because it is an unsigned integer. As such, it
cannot be tempered with while another thread is reading it. When
entering the generated function, the first operation done is reading
'op'. If we have concurrency, we will have access sequences returning
either EFL_NOOP or a VALID op, because 'op' is not set until the very
end of the function, when everything has been computed. As such, we now
use the 'op' atomic integer to instore a lock-free/wait-free mechanism,
which allows to drop the TLS nature of the cache, speeding up the access
to the cache, and therefore making functions execute faster.

We don't test anymore the generation count. This can be put as a
limitation. If means that if you call efl_object_shutdown() and
re-initialize it later with different data, opcodes will be invalid.
I am not sure there is any usecase for this to ever happen.
We could move all the caches in a dedicated section, that can be
overwritten after a call to efl_object_shutdown(), but I am not sure it
will be very portable.

Benchmark: mean over 3 executions of
   ELM_TEST_AUTOBOUNCE=100 time elementary_test -to genlist

```
                     BEFORE               AFTER
------------------------------------------------------------
time (ns)            11114111647.0        9147676220.0
frames               2872.3333333333335   2904.6666666666665
time per frame (ns)  3869364.6666666665   3149535.3333333335
user time (s)        11.096666666666666   9.22
cpu (%)              22.666666666666668   18.333333333333332
```

Ref T6580

Reviewers: raster, cedric

Subscribers: cedric, jpeg

Maniphest Tasks: T6580

Differential Revision: https://phab.enlightenment.org/D5738
2018-01-16 17:50:46 +09:00
Bryce Harrington ebdfc54def eina: document quadtree
Reviewers: cedric, ajwillia.ms

Subscribers: segfaultxavi, jpeg

Differential Revision: https://phab.enlightenment.org/D5522

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2018-01-12 11:25:04 -08:00
Vincent Torri 4916973a60 efl: remove inclusion of dirent.h where it is not used
Test Plan: compilation

Reviewers: cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D5733

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2018-01-12 11:06:12 -08:00
Carsten Haitzler f32f0d89f4 mmap memory allocation - do not used when under valgrind
we can't sensibly use things like massif to track memory if we bypass
itr with mmaping -1 fd anonymous memory... so if built with valgrind
support and running under valgrind, use malloc/calloc and free so
these tools actually do something useful for these bits of memory.
2018-01-12 03:02:43 +09:00
Cedric Bail 79d7483fe7 eina: add eina_promise_continue_new to create a promise using an existing dead future. 2018-01-10 18:16:25 -08:00
Carsten Haitzler 2fb80270ba efl thread signal masks - fix up for various threads manually created
so xine module plus 2 eina dbug threads didnt set up signal
blocking/masks correctly. xine use ssigprocmask not pthread_sigmask
and the other 2 didnt even bother at all. fix this so these threads
all block most of these commnly caught signals so these threads never
get them
2018-01-06 18:20:23 +09:00
Vincent Torri 4ae6eeb2cf efl: remove _MSC_VER (Visual Studio macro) usage in source code 2018-01-04 12:59:47 -08:00
Andy Williams 8e23f6abff Merge branch 'devs/xartigas/typos' 2018-01-03 09:21:33 +00:00
Carsten Haitzler 0ccf813112 eina debug - use pthread _sigmask instead of sigprocmask like elsewhere
elsewhere in efl we moved to pthread_sigmask but eina debug didn't, so
mirror the changes here too. at this point in time when we are
initting eina debug this shouldnt really matter much as we're single
threaded until this pthread_Create is called. after that tough...
we're not. signals + threads is a nightmare though... horrible
horrible...
2018-01-03 13:05:16 +09:00
Xavi Artigas ee61190af8 Typo in error message 2018-01-02 13:56:04 +01:00
Xavi Artigas e4e48aa4f9 Typo in example 2018-01-02 13:56:04 +01:00
Carsten Haitzler b27ca559f6 remove elgacy ecore event usage in futures that limit to mainloop only
also eina_procmis was not threadsafe so cannto use loops in different
threads at all until this was made safe. needed to disable the old
ecore_event using code in for ecore futures and create a new efl loop
message future and handler instead ... but now a quick experiment with
multiple loops in 10 threads plus mainloop have timers at least work.
i need to test more like fd handlers etc etc. but it's a step.
2017-12-28 02:24:12 +09:00
Andy Williams 9a4eedb078 Remove all ocurrences of SPANK from our user facing errors.
This has been bugging me for some time but now we are triggering new errors internally
this is appearing to end users for problems they did not cause.

Additionally I was able to improve a couple of the errors by copying the
explanation from code comments into the error message.

Shorter error logs now too :)
2017-12-22 11:18:46 +00:00
Carsten Haitzler 9c88bc4933 elm build for osx - try another dotting of i's and crossing of t's
try this and fix T6448 ...
2017-12-20 19:07:01 +09:00
Cedric BAIL 98aa1a4eb1 eina: fixup EAPI definition. 2017-12-19 09:54:45 -08:00
Jean Guyomarc'h e835a02ebb eina: fix random segfaults when displaying BT
Under some circumstances, eina crashes when attempting to display the
backtrace, because dladdr() may yield a dli_fname that is NULL. This is
especially annoying in realease, when the backtrace is shown by default
when CRI/ERR are thrown.

@fix
2017-12-19 16:56:22 +01:00
Jean-Philippe Andre 29ce7550eb eina: Add missing eina_internal.h 2017-12-19 10:20:18 +09:00
Cedric BAIL 90f30ea418 eina: make __eina_promise_cancel_all an internal only function. 2017-12-18 16:17:04 -08:00
Jean-Philippe Andre 5dbfb7961f eo/eina: Add HACK to avoid calls to EO after shutdown
Efl.Future is an EO object which means even cancelling Efl.Future
objects requires EO. So this should be done before shutting down EO,
otherwise everything fails badly.

I believe Efl.Future is going to disappear soon, but the problem will
remain: if any promise/future uses EO or anything else outside of Eina
(so, basically anything) then it needs to be canceled before shutting
down the above layers. This is the same situation as with ecore events,
for which we've introduced ecore_event_type_flush.

Ping @cedric
2017-12-18 19:54:31 +09:00
Ross Vandegrift 71e5c74eb6 efl: drop deprecated Encoding key from desktop files
Summary:
The Encoding key is no longer required, all desktop files are assumed to
be UTF-8 encoded.  See details at:
https://standards.freedesktop.org/desktop-entry-spec/1.1/apc.html

Fix various typos and misspellings

lintian, Debian's package checker, uses strings to check for common typos
in compiled binaries.  This change fixes the ones it identified in 1.20.6.

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5584

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-12-13 10:27:48 -08:00
Cedric BAIL 3e73c10055 eina: add an error for when a feature is not implemented. 2017-12-11 14:35:06 -08:00
Chris Michael b3c29fd25c eina: Fix typo in doxygen
@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-12-11 14:51:55 -05:00
Vincent Torri 771bb6e6a7 Evil: use static buffer to store error messages
Reviewers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5394
2017-12-11 16:04:02 +09:00
Andy Williams 9d09d722b9 eina: Update header for readability
Author Nate Drake
Reviewer: Andy Williams
2017-12-07 16:21:11 +00:00
Al Poole 1be1ef168a eina_file_win32: also check for copy before unmapping region. 2017-12-02 11:45:53 +00:00
Al Poole a538f47854 eina_file: make sure we use a stringshare when virtualized.
As the filename is now a stringshare, also make sure virtual
files use stringshares for the filename! Also when unmapping
we still need to test whether it is copied or not as unmap
will break on less tolerant architectures.

@fix T6449
2017-11-30 13:57:25 +00:00
Carsten Haitzler e0f4455eaa eina safepointer - mimic 47 bit eoid patch
same thing as b209b9a92286209281c12e81fd9dd72dc28c7495 but for safeptr
2017-11-24 18:29:23 +09:00
Pawel Aksiutowicz c7bedc2b23 eina: warning removed from eina_debug_timer
Reviewers: stanluk, lukasz.stanislawski

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5500
2017-11-21 11:17:51 +09:00
Bryce Harrington 98fd820648 eina: Fix matrix header guard name
Summary:
eina_matrix.h includes matrix2, matrix3, and matrix4, so the header
guards shouldn't specify MATRIX3.

Reviewers: cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D5508
2017-11-21 11:00:53 +09:00
Bryce Harrington cc14a1288c eina: Indicate in and out parameters for eina_matrix
Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5496
2017-11-20 12:02:24 +09:00
Cedric Bail 7821367b1a eina: properly initialize EINA_ERROR_VALUE_FAILED. 2017-11-17 11:12:06 -08:00
Cedric Bail 7cfb9e00ed eina: properly initialize EINA_ERROR_NOT_MAIN_LOOP. 2017-11-17 11:11:48 -08:00
Cedric Bail 574d4526cb eina: properly initialize EINA_ERROR_MAGIC_FAILED. 2017-11-17 11:11:28 -08:00
Cedric Bail 8fbd8bfe2a eina: fail with an Eina_Error on copy failure. 2017-11-17 10:44:26 -08:00
Andy Williams 63c6724f08 eina: fix docs for manage_read_only_new 2017-11-16 12:49:56 +00:00
Bryce Harrington 1227f914e2 eina: Improve API docs for eina_crc.h
Reviewers: cedric, ajwillia.ms

Reviewed By: ajwillia.ms

Subscribers: jpeg, segfaultxavi

Differential Revision: https://phab.enlightenment.org/D5468
2017-11-14 13:14:59 +00:00
Bryce Harrington 7764abe8f6 eina: Fix spelling/punctuation errors in docs (quaternion..rectangle)
Reviewers: cedric, ajwillia.ms

Subscribers: segfaultxavi, jpeg

Differential Revision: https://phab.enlightenment.org/D5450
2017-11-13 12:09:21 +09:00
Bryce Harrington b60c3fb3ba eina: Fix spelling/punctuation errors in documentation (safepointer..strbuf)
Reviewers: cedric, ajwillia.ms

Subscribers: segfaultxavi, jpeg

Differential Revision: https://phab.enlightenment.org/D5458
2017-11-13 12:05:09 +09:00
Bryce Harrington dab3a6fca3 eina: Fix spelling/punctuation errors in documentation (thread..xattr)
Summary:
Also makes some of the doxygen comment line spacing/formatting
consistent.

Interesting ref on grammar of 'an uniform' vs. 'a uniform':
  https://english.stackexchange.com/questions/4700/is-it-a-uniform-or-an-uniform
It is AN honor to work with such A uniform language as English. *sigh*

Reviewers: cedric, ajwillia.ms

Subscribers: segfaultxavi, jpeg

Differential Revision: https://phab.enlightenment.org/D5459
2017-11-13 12:04:59 +09:00
Bryce Harrington d0ded365e9 eina: Add API doxygen for eina_rbtree_inline_lookup()
Reviewers: cedric, ajwillia.ms

Subscribers: segfaultxavi, jpeg

Differential Revision: https://phab.enlightenment.org/D5460
2017-11-13 12:04:39 +09:00
Bryce Harrington 3830cbaa25 eina: Improve eina_alloca API dox
Reviewers: cedric, ajwillia.ms

Subscribers: segfaultxavi, jpeg

Differential Revision: https://phab.enlightenment.org/D5461
2017-11-13 12:04:32 +09:00