Commit Graph

32 Commits

Author SHA1 Message Date
Wander Lairson Costa b767e28625 Protect EINA_(UN)LIKELY with parenthesis around the expr
Without it an expression like !EINA_LIKELY(a && b) expands
!a && b

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Differential Revision: https://phab.enlightenment.org/D12041
2020-07-03 18:17:29 +02:00
Xavi Artigas 80acb33898 Eina: Remove eina_prime_table
This has been present since ancient times and no current uses have been detected.
It's an array containing SOME prime numbers without a terminator, so the caller
needs to know the array length in advance.
This does not look very useful (or usable) and therefore it has been decided in
public IRC session to send this thing to hell.
Witnesses: raster stefan_schmidt bu5hm4n
2020-03-27 13:33:04 +01:00
Xavi Artigas 0fa18c0866 doxygen docs: Add missing docs for core Eina types
Things like EINA_LIKELY or EAPI were undocumented...
2020-03-27 13:33:04 +01:00
Myoungwoon Roy, Kim 3feacb2b66 docs: Fix Eina Core Group
Summary: I had fixed unlinked Eina API group(eina_main, eina_types, hamster) from Eina nodes. Those APIs included into Core group before.

Test Plan: API reference documentation modification only

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11605
2020-03-27 10:19:54 +01:00
Xavi Artigas 5b2d2a85b2 doxygen docs: Fix tons of invalid Doxygen commands
Mostly typos
2020-03-10 21:36:34 +01:00
Xavi Artigas c6e40641aa doxygen docs: Miscellaneous typos 2020-03-09 09:35:40 +01:00
Xavi Artigas c2738b4ed9 docs: A bit more info and formatting for Eina_Process_Cb
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11063
2020-02-19 16:34:08 +01:00
Marcel Hollerbach 74491e8781 eina: introduce eina_iterator_process
this brings a functional-map function to the iterator implementations.
https://en.wikipedia.org/wiki/Map_(higher-order_function)

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D11062
2020-02-19 16:34:05 +01:00
Carsten Haitzler eb72593bbc eina - rmeove dup EINA_PRINTF
sorry for the noise...
2020-01-15 18:10:24 +00:00
Carsten Haitzler d990ab7dba eina - enable EINA_PRINTF for clang as well as gcc 2020-01-15 19:06:07 +01:00
Marcel Hollerbach a349bd46eb eina: move definition of EFL64
previously it was defined in eina_config.h however. This file is
autogenerated, and having autogenerated parts of a file and static parts
is quite painfull, thus the definition is moved into eina_types.

Differential Revision: https://phab.enlightenment.org/D7104
2018-10-02 16:13:13 +02:00
Bryce Harrington f6d397df04 eina: Add doxygen in/out tags for remaining APIs
Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7007
2018-09-08 07:19:53 -04: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
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
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
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
Cedric BAIL 1aa2b6de14 eina: enable fallthrough warning suppression only on GCC 7 and above. 2017-06-06 09:57:14 -07:00
Jérémy Zurcher 81bcc14615 eina: fix clang compilation with EINA_FALLTHROUGH
btw, using clang 4.0.0, I can't produce fallthrough warnings using
-Weverything, -Wall or -Wimplicit-fallthrough
2017-06-06 09:58:06 +02:00
Cedric BAIL 2995cc16b7 eina: add EINA_FALLTHROUGH to disable warning on useful case serie with no break.
GCC has started introducing a detection for series of case in a switch statement
without break for each case. We do use that trick a lot to reduce our code base.
Even if in most case we have documented this so that people using coverity don't
try to fix it. Now with GCC we need to silence it properly to avoid future
problem.
2017-06-05 12:07:57 -07:00
Cedric Bail 8187e34741 eina: some architecture don't like prefetch on NULL apparently. 2017-04-21 11:29:38 -07:00
Myoungwoon Roy, Kim ec71f6607a docs: Fix typos and some wrong expressions in Eina API reference doxygen.
Summary: I had fixed some typos and some wrong expressions, such as capital letters, singular, and orders of groups in Eina API reference doxygen.

Test Plan: Doxygen Revision

Reviewers: stefan, cedric, raster, Jaehyun_Cho, jpeg

Reviewed By: jpeg

Subscribers: conr2d

Differential Revision: https://phab.enlightenment.org/D4674
2017-02-21 10:46:28 +09:00
Jean-Philippe Andre 119e35b791 eina: Fix compilation with clang
It's not because the bug with __builtin_prefetch is inside
clang/llvm that we must break the build for people who prefer it
over gcc. As soon as a non-broken version is out, the ifdef must
be either removed (and ask people to update their clang install)
or add a version check based on __clang_xxx__.

Compilation tested with clang 3.8.1 and gcc 6.2.1.
2016-10-05 19:40:50 +09:00
Carsten Haitzler a06f5c1024 eina - add prefetch macros to map to compiler builtins if they exist
this allows you to portably use prefetch compiler builtins. this adds
EINA_PREFETCH(), EINA_PREFETCH_WRITE(), EINA_PREFETCH_NOCACHE() and
EINA_PREFETCH_NOCACHE_WRITE() macros to do this that are "nothing" if
your compiler doesnt support it. of course it also requires your
compielr compile instructions for your architecture and it can only do
so if the architecture it compiles for has these instructions, so be
aware.

@feat
2016-10-01 15:38:23 +09:00
Jean-Philippe Andre 67ab4e3b4d eina: Move EWAPI and EAPI_WEAK to Eina.h from Eo.h
So it may be used outside EO (eina error is what I have in mind).
I believe it doesn't need to be redefined in all EFL libs, especially
since it's not used on Windows yet.
2016-08-16 16:14:21 +09:00
Carsten Haitzler f40a452ee1 fix warnings about double/float comparisons in eina vector
this should fix T3245

this is basicall where we go double a == double b and due to precision
issues this may not always be right, but this means that the
equivalent now checks for "really close values" rather than perfectly
exact.

@fix
2016-05-20 21:46:50 +09:00
Cedric BAIL 0dfb263a28 eina: remove the need to order the header correctly for Windows. 2015-05-07 09:53:10 +02:00
woochan lee dbf56936dc Delete whitespaces for header and eo files
Summary: Fix whitespaces, indentation, wrap in eina headers.

Reviewers: cedric, jeffrey.w.grimshaw, Hermet

Reviewed By: Hermet

Subscribers: cedric

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

Conflicts:

	src/lib/eina/eina_thread_queue.h
2015-04-10 14:19:10 +09:00
Jeff Grimshaw cf5192025f efl/eina: General cleanup of Eina documentation
Summary:
I've combed through the Eina source files and made enhancements to the
documentation, including:
- Document the undocumented
- Fixed some errors in Doxygen markup
- Moved some function documentation from implementation (.c or .x) to definition
  (.h)
- Edited some of the entries to improve clarity

Test Plan: Reviewers

Reviewers: cedric

Reviewed By: cedric

CC: cedric

Differential Revision: https://phab.enlightenment.org/D639
2014-03-20 16:35:42 +09:00
Jérémy Zurcher d0f3357f77 TES
Conflicts:
	src/lib/eina/eina_list.c
	src/lib/eina/eina_types.h
2013-03-20 11:48:44 +01:00
Vincent Torri 7fe3d35994 merge: __UNUSED__ --> EINA_UNUSED and some fixes in eo.
SVN revision: 77542
2012-10-05 20:09:47 +00:00
Vincent Torri 1c96844922 Eina: backport rev. 77445
SVN revision: 77446
2012-10-04 17:16:18 +00:00
Carsten Haitzler 0a5ba96837 move eina headers into lib/eina like the rest of efl - at least be
consistent with the majority.



SVN revision: 77119
2012-09-27 04:02:37 +00:00