Commit Graph

1098 Commits

Author SHA1 Message Date
Bryce Harrington c96f3d5ba5 eina: tighten grammar in eina_hash API docs.
Summary:
Improve the verbage in the doxygen comments.  Refer to the value being
changed as the 'previous' rather than the 'old' value, to be more
precise.  Drop the phrase 'keeping API sane' as it is unnecessary and
is an odd thing to say.  Try to avoid referring to 'your program' as we
shouldn't assume the reader's situation.

Reviewers: cedric

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2018-03-06 19:05:57 -08:00
Bryce Harrington 3b508dfc19 eina: define the in/out params for eina_bezier
Reviewers: cedric

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2018-03-06 19:05:57 -08:00
Bryce Harrington 75a2dbf0d3 eina: use better parameter name in eina_rectangle
Summary:
'thiz' is not commonly used in EFL, more commonly used is a word or
abbreviation that is descriptive of the object being used ('hash' for
Eina_Hashes, 'str' for Eina_Strings, 'array' for Eina_Arrays, etc.)
Follow this convention by using 'rect' (as used already in various
places) instead of 'thiz' or 'r'.

Reviewers: cedric

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2018-03-06 19:05:57 -08:00
Bryce Harrington e849e64fb9 eina: specify error returns in @return for eina_list API docs
Summary:
For all routines that can return NULL on error, mention this in the
function's @return docs.  In cases where a small number of situations
result in this return, move the docs to the @return; in other cases just
state the NULL return briefly and leave the elaboration in the body.

Reviewers: cedric

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2018-03-06 19:05:57 -08:00
Carsten Haitzler 1bdd9e4dd1 ecore - a different take on efl.app class as a super class to efl.loop
so the MAIN loop is actually an efl.app object. which inherits from
efl.loop. the idea is that other loops in threads will not be efl.app
objects. thread on the creator side return an efl.thread object.
inside the thread, like the mainloop, there is now an efl.appthread
object that is for all non-main-loop threads.

every thread (main loop or child) when it spawns a thread is the
parent. there are i/o pipes from parnet to child and back. so parents
are generally expected to, if they want to talk to child thread, so
use the efl.io interfaces on efl.thread, and the main loop's elf.app
class allows you to talk to stdio back to the parent process like the
efl.appthread does the same using the efl.io interfaces to talk to its
parent app or appthread. it's symmetrical

no tests here - sure. i have been holding off on tests until things
settle. that's why i haven't done them yet. those will come back in a
subsequent commit

for really quick examples on using this see:

https://phab.enlightenment.org/F2983118
https://phab.enlightenment.org/F2983142

they are just my test code for this.

Please see this design document:

https://phab.enlightenment.org/w/efl-loops-threads/
2018-03-03 13:40:33 +09:00
subhransu mohanty 2bad5fffce eina/bezier: use FLT_EQ marcro for float equal comparison.
Reviewers: SanghyeonLee, jpeg, cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5828
2018-02-28 15:15:20 +09:00
Marcel Hollerbach ae51034b85 eina_vpath: include the config header
so the function detection macros are defined.
2018-02-26 12:21:56 +01:00
Carsten Haitzler f44ccfe1d5 eina - windows home get - donyt have static buffer and do it like unix 2018-02-25 19:29:50 +09:00
Carsten Haitzler 411e140eaf eina vpath - improve docs and add app.tmp and usr.tmp vpaths too
definitely kaes the docs better with lots of sample paths and some
indication of what these may map to in real life.
2018-02-23 16:26:30 +09:00
Cedric Bail d57b9a7d14 eina: make eina_vpath_interface_app_set an internal function.
I am wondering if this one shouldn't even be a private one and
directly used by eina_prefix.
2018-02-22 15:26:28 -08:00
Cedric Bail b575c41676 eina: make eina_vpath_interface_user_set an internal API. 2018-02-22 14:57:36 -08:00
Marcel Hollerbach c4f33c67a8 move from efl.vpath to eina_vpath
The usages from efl.vpath are moved to to eina_vpath
2018-02-22 09:26:55 +01:00
Marcel Hollerbach 7165003bc6 introduce eina_vpath!
Its the successor of efl.vpath, the api is synchronous, and supports
addtional vpath paths, new apis cal always be added to use them.
2018-02-22 09:26:55 +01:00
Bryce Harrington 274730fc5f eina: improve documentation for eina_bezier.
Summary:
Adds missing @param docs and fixes an incorrectly documented one.
Clarifies difference between 'length' and 'position', specifying the
latter is a number between 0.0 and 1.0.  Improves verbage here and there
for grammatical correctness and internal consistency.

Subscribers: cedric

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2018-02-14 12:47:40 -08:00
Bryce Harrington ba64b372d3 eina: make doxygen @notes consistent in eina_hash
Summary:
These routines all have slight permutations of the same basic note, but
are each formatted a bit differently.  Fix that and a few punctuation
irregularities.

Similarly for a couple @warnings, and escalate one @note to a @warning
since what it describes might be a security issue so deserves
highlighting.

Subscribers: cedric

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2018-02-14 12:47:40 -08:00
Bryce Harrington d58ae6b12f eina: fix minor spelling mistake in eina-private.h doxygen
Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2018-02-14 12:47:40 -08:00
Bryce Harrington 572ffe7271 eina: use matrix compose in place of equivalent code in matrix multiply
Summary:
The eina_matrix3_compose and eina_matrix3_multiply API's are
mathematically identical (even though the implementations are
reversed... weird), except that the latter also includes a fastpath for
identity matrices.

Having two functionally equivalent APIs is redundant, so ideally one or
the other would be dropped.  But in order avoid API breakage, just have
one routine wrapper the other and eliminate the internal redundancy.

(Note that the parameter signatures of the two routines are different -
eina_matrix3_compose() takes the two input matrices first, and the
output matrix last, while eina_matrix3_multiply() takes the parameters
in the reverse order.  This inconsistency in the API style could result
in accidentally erroneous usage and would be an argument for deprecation
of one of the two APIs.)

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

Reviewers: cedric

Reviewed By: cedric

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2018-02-14 12:47:40 -08:00
Bryce Harrington cf2ce1c675 eina: cleanup doxygen for eina_rectangle.
Summary:
Some spelling/punctuation/grammar/formatting fixes to make the
rectangles doxygen more consistent.  Simplify wording in several places,
including removing redundant documentation of return values.  Reword the
rectangle cutting API's to be more clearly worded.  Make clearer mention
of parameters that get changed by the function call, and ones that
allocate memory.

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2018-02-14 12:47:40 -08:00
Carsten Haitzler 43ac3c0b4c eina - tiler -= return true if rect alreadt there as its not a failure
docs say return true on succesas, false on failure. adding a rect we
already added is not a failur. it's an optimization to a NOP. so fix.
this was brought up by and fixes T6669 ... but in the opposite way.
2018-02-11 15:55:13 +09:00
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