Commit Graph

111 Commits

Author SHA1 Message Date
Marcel Hollerbach 7968a0d0b9 move efreet xdg envvars to eina
Summary:
The contents of the XDG_ env vars are also usefull for eina subsystems,
thus we should init those env vars here.

Depends on D6751

Reviewers: zmike, stefan_schmidt, #committers

Reviewed By: zmike, #committers

Subscribers: #reviewers, cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6744
2018-08-20 12:57:57 -04:00
Mike Blumenkrantz 00bc3af4dd tests: add test for eina_debug signal handling
Summary:
currently this crashes, so add a simple test to ensure that it works
eventually

ref T7028

Reviewers: ManMower, devilhorns

Reviewed By: ManMower

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T7028

Differential Revision: https://phab.enlightenment.org/D6311
2018-06-19 14:04:40 -04:00
Mike Blumenkrantz 492814bf2f tests: unbreak PACKAGE_BUILD_DIR usage in makefiles
for some reason, a few projects changed this from the expected value of
abs_top_builddir for their test suites, breaking the usage of this define
within those tests

fix T6812

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:27 +02: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
Jean-Philippe Andre 29ce7550eb eina: Add missing eina_internal.h 2017-12-19 10:20:18 +09:00
Guilherme Iscaro 5bd8c9a78d Eina: Add Eina_Promise/Eina_Future.
This commit adds a new promise/future API which aims to replace
efl_future.
2017-09-04 10:24:00 -03:00
Stefan Schmidt 50b8fa08e5 eina: make sure the eina_debug_private.h header is included into dist
This has been missing in the dist tarball and failed distcheck.
2017-06-21 18:17:31 +02:00
Daniel Zaoui f5cbb61bf4 Add a better support of timers
Now, the timers are handled in one dedicated thread. Multiple timers are
supported.
2017-06-05 08:55:36 +03:00
Daniel Zaoui 5f268ec26a First patch of the Eina Debug layer rewriting
Eina Debug is a new layer aimed for EFL debugging. It offers scalability
by allowing registration of operations not specific to EFL core.

The protocol is simple and the APIs try to provide as much
functionalities/freedom as possible.
2017-06-05 08:51:49 +03:00
Romain Naour f166d271f0 eina_modinfo: add missing dependency on libeina.la
Fixes:
libtool:   error: cannot find the library 'lib/eina/libeina.la' or unhandled
argument 'lib/eina/libeina.la'

Signed-off-by: Romain Naour <romain.naour@gmail.com>
2017-02-10 09:47:44 +01:00
Gustavo Sverzut Barbieri f8487fb77b fix build with split eina_modinfo directory. 2017-01-23 18:01:07 -02:00
Gustavo Sverzut Barbieri d9815a6837 CMake: move eina binaries to single dir, add helper macros.
For one-source directories, be smart and just define SOURCES to that,
will reduce the number of too-simplistic CMakeLists.txt in our tree.

This also fixes problems with libraries, they should be private, not
public. So specify both kinds as different variables.
2017-01-23 18:23:40 +01:00
Jean-Philippe Andre 4550b4cf83 eina: Introduce Eina_Slstr for short-lived strings
Built on top of the new 'postponed' free queue, the short-lived
strings API allows users to return new strings without caring
about freeing them. EFL main loop will do this automatically for
them you at a later point in time (at the end of an iteration).

The APIs provided will either duplicate (copy) or more generally
steal an existing string (char *, stringshare, tmpstr, strbuf),
taking ownership of it and controling its lifetime. Those strings
can then be safely returned by an API. From a user point of view,
those strings must be considered like simple const char *, ie.
no need to free() them and their validity is limited to the
local scope.

There is no function to remove such a string from the freeq.

The short lived strings API is not thread-safe: do not send a
short-lived object from one thread to another.

@feature
2017-01-17 14:20:55 +09:00
Cedric BAIL 95e1cefb40 eina: add test for all float/double util function. 2017-01-06 15:58:46 -08:00
Cedric BAIL 8519ae4481 eina: include forgotten test file in release tarball. 2017-01-06 15:58:46 -08:00
Cedric BAIL 8e7d7d9d58 eina: move to use memcmp and rename eina_{flt,dbl}eq to eina_{flt,dbl}_exact. 2017-01-06 15:58:46 -08:00
Cedric BAIL 18f41e12bc eina: try slight improvement of eina tests suite.
Still need to go through individual test to improve them.
2016-12-21 16:40:22 -08:00
Cedric BAIL de131bf5d0 eina: remove Eina_Promise. 2016-11-07 13:43:11 -08:00
Cedric BAIL e842c79ff3 eina: remove Eina_Promise tests. 2016-11-07 11:23:59 -08:00
Carsten Haitzler 0ee33e7b4b eina - add a free queue (eina_freeq) for deferring frees of data
this adds eina_freeq api's for c land for deferring freeing of
pointers and can be used a s a simple copy & paste drop-in for free()
just to "do this later". the pointer will eveentually be freed as
eina_shutdown will free the main free queue and this will in turn free
everything in it. as long as the main lo0op keeps pumping things will
og on the queue and then be freed from it. free queues have limits so
if they get full they will clear out old pointers and free them so it
won't grow without bound. the default max is 1mb of data or 16384
items whichever limit is hit first and at that point the oldest item
will be freed to make room for the newest. the mainloop whenever it
finishes idle enterers will add an idler to spin and free while idle.
the sizes can be tuned and aruged about as to what defaults should be.

this also allows for better memory debugging too by being able to fill
freed memory with patterns if its small enough etc. etc.

@feature
2016-11-06 13:13:10 +09:00
Derek Foreman e2875cefc4 eina_cpu, evas: Remove _eina_cpu_fast_core_get, don't set render thread affinity
We've decided it would be best to just let the scheduler do its job.
2016-09-20 11:38:57 -05:00
Carsten Haitzler 41c332b726 eina - redo a lot of the static inlines to have better instr cache usage
this moves a lot of logic that is rare away from the linear/flat asm
path of code so we et fewer l1 cache misses when executing chuncks of
our code. this also reduces the code size and takes some funcs like in
eina_inline_lock_posix.x and makes them real functions to reduce code
size thus better l1 cache usage - only for new/free of locks.
spinlocks, semaphores etc. as these will have no advantage being
inlined but simply bloat out code size instead.

overall this actually reduces efl lib binary sizes 0.4%, so that's a
good sign.

this passes make check and i think i got it right... let me know if i
didn't. i'm also not sure i should just keep the static inlines and
not make the formerly static inline funcs full EAPI ones now... good q.
2016-09-20 14:53:05 +09:00
Derek Foreman 13da63d260 eina_cpu: Add an internal api for getting a random fast core
In a big.LITTLE ARM system cores can have different capabilities.  This
gives an internal API that randomly returns the core id of any of the
system's fastest cores.

On systems where all cores are the same, it will return any available core.

If we don't have cpufreq support we just return 0
2016-09-16 14:10:49 -05:00
Amitesh Singh d88f08f7e9 eina: module - Add macros for adding module informations
Summary:
These macros allow you to define module informations like
author/description/version/license

e.g.
// Use "Name <email id>" or just "Name"
EINA_MODULE_AUTHOR("Enlightenment Community");
// Mention license
EINA_MODULE_LICENSE("GPL v2");
// What your module does
EINA_MODULE_DESCRIPTION("This is what this module does");
// Module version
EINA_MODULE_VERSION("0.1");

Now eina_modinfo can show these informations to users

$ eina_modinfo module.so
 version: 0.1
 description:   Entry test
 license: GPLv2
 author:  Enlightenment Community

@feature

Reviewers: cedric, tasn, raster, jpeg

Subscribers: seoz

Differential Revision: https://phab.enlightenment.org/D4257
2016-08-31 16:17:53 +05:30
Gustavo Sverzut Barbieri 9062bbd8e0 eina: introduce Eina_Slice and Eina_Rw_Slice.
A plain simple pointer + length describing a linear memory region.
2016-08-22 18:25:14 -03:00
Stefan Schmidt 00227b81f4 build: do not dist now longer available files
Another cleanup for commit dd1d3f0d2d. These
makefiles are now longer available better not try to dist them.
2016-08-02 08:32:13 +02:00
Cedric BAIL e546fb767b eina: add forgotten file for distcheck. 2016-06-10 14:53:36 -07:00
Cedric BAIL edc753d1a2 eina: add tests suite for Eina_Safepointer. 2016-06-10 14:09:41 -07:00
Cedric BAIL 692b2c9fc9 eina: add generic infrastructure for a Eina_Safepointer
This is heavily inspired from Eo_Id infrastructure. Main change
are that the lower bit are always guaranteed to be zero and ignored
by all function. Also it may be a little bit less efficient in some
case, but we will tune it once we have real life usage of it.

Eo won't be migrated for 1.18 to it as Eo_Id is deeply integrated
and it is quite risky to touch it so close from a freeze. This can
wait.
2016-06-10 13:57:01 -07:00
Stefan Schmidt 93eadd76d6 build: split EXTRA_DIST files in src/ off from DISTFILES and handle separately
This is again to avoid the "Argument list too long" error we are hitting more and
more now. Given we just merged elementary, emotion generic players, evas generic
loaders and elm_code it is not surprising we are hitting it again.

This time the number of files being hold in DISTFILES has just grown to big so a
make dist was no longer possible. If one looks at what the DISTFILES variable
from automake holds you can image it grows a lot with all the source files plus
generated files we have in tree now.

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)

To cut off a big chunk but still keep all the other automagic in place for
SOURCE files I went and renamed the EXTRA_DIST in src/ to EXTRA_DIST2 and handle
the files in a dist-hook now.

Another thing to note here is that this also only happens as we have the one big
Makefile with includes. If we go back to per directory Makefiles this problem
should vanish as well. In any case we need a solution for 1.18 now and this is
what I have to offer. If you have a cleaner solution in mind feel welcome to
test it out and if everything we need keeps working (make, make examples,
make check, make benchmark, make dist and make distcheck) go ahead.
2016-06-10 13:04:18 +02:00
Cedric Bail fdaedf2bff autotools: fix make distcheck. 2016-04-15 11:07:02 -07:00
Felipe Magno de Almeida 1d314828f7 eina: add tests for promises 2016-04-05 11:35:12 -07:00
Felipe Magno de Almeida 09eea7bc01 eina: add promise
Add a promise object that will allows Eolian interface to include promises
as a way to have asynchronous value return and composibility.

To understand better, let see the coming usage in a .eo file:

class Foo {
   methods {
      bar {
         params {
            @inout promise: Promise<int>;
         }
      }
   }
}

Which will create the following API interface:

void foo_bar(Eo* obj, Eina_Promise** promise);

and the equivalent declaration for implementation.

However, the API function will instantiate the Promise for the user
and the implementer of the class automatically. So the user of this
function will treat it as a @out parameter, while the developer of the
function will treat it like a @inout parameter.

So, the user will use this function like this:

Eina_Promise* promise; // No need to instantiate
foo_bar(obj, &promise);
eina_promise_then(promise, callback);

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-04-05 11:35:12 -07:00
Stefan Schmidt 96bb964dd5 Revert "eina: split Makefile with files/headers in preparation for additional per sub directory compilation"
This reverts commit 7f4ea1a79c.

This reverts one of three parts of the try to get sub directory
compilation back into eina. It breaks our distcheck though and I
talked to Cedric about it and he prefers to revert these as we might
need to go another route to bring this functionality back. Details
will come to the mailing list.
2016-03-08 00:18:08 +01:00
Stefan Schmidt c55625aec4 Revert "eina: rely on GNU make to find file at their correct location."
This reverts commit e26fcbb1dc.

This reverts one of three parts of the try to get sub directory
compilation back into eina. It breaks our distcheck though and I
talked to Cedric about it and he prefers to revert these as we might
need to go another route to bring this functionality back. Details
will come to the mailing list.
2016-03-08 00:18:08 +01:00
Cedric Bail e26fcbb1dc eina: rely on GNU make to find file at their correct location. 2016-03-03 21:10:00 -08:00
Cedric Bail 7f4ea1a79c eina: split Makefile with files/headers in preparation for additional per sub directory compilation 2016-03-03 15:10:59 -08:00
Vincent Torri ddf723e15b Add efl_check.h to eina unit test files as Eina is mandatory 2016-02-16 12:41:06 +00:00
se.osadchy 9e00bd01a1 eina: add test case for eina_vector2
Summary: Create eina_test_vector and add first test case.

Reviewers: cedric, stefan_schmidt

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3560
2016-01-13 13:46:49 +01:00
Jean-Philippe Andre d488926cb6 Eina: Move vector2 to eina_inline_vector.x
For consistency.

Also, include inside Eina.h
Thanks @vtorri for the remark.
2016-01-07 19:18:35 +09:00
Jean-Philippe Andre dd05e72ab0 Eina Vector2: Move EAPI to static inline
This removes lots of unnecessary symbols
2016-01-07 18:05:44 +09:00
se.osadchy 2127547cb9 evas: create Eina_Vector2 structure and add functions.
Summary: Only copy code from evas_3d_utils, rename evas to eina and add documentation.

Reviewers: Hermet, raster, jpeg, cedric

Reviewed By: jpeg, cedric

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:06:00 -08:00
Vincent Torri 47ed848a87 Evil: integrate the dlfcn code into Evil
This will remove some incompatibilities with other packages,
especially for win-builds
2015-12-29 22:13:58 +09:00
Vincent Torri 33227fc15d eina: add API to join pahs, as well as path separators
eina_str_join() is used a lot to contatenate paths, but the
separator should be '\' on Windows. So add 2 API and 2 defines for
more cross platform code

@feature

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-08-21 17:10:29 +02:00
Subhransu Mohanty 6afb497d91 eina: add test for Eina_Bezier. 2015-08-07 14:33:52 +02:00
Subhransu Mohanty ddb8515930 eina: add Eina_Bezier infrastructure for manipulating cubic bezier curves. 2015-08-07 14:33:52 +02:00
Cedric BAIL a07c526460 eina: add intermediate inline function for eina_crc.
This is necessary to make my life easier when adding assembling implementation
of eina_crc.
2015-08-03 11:51:22 +02:00
Cedric BAIL 0acf23857f eina: beginning of a generic quaternion API. 2015-05-29 17:20:29 +02:00
Cedric BAIL 9a83100a4a eina: add the beginning of an Eina_Matrix4 API. 2015-05-29 17:20:28 +02:00
Vivek Ellur 331068b84a eina: add test cases for various APIs in eina_quad module.
Summary:
Added test cases for all the APIs in einq_quad module

Signed-off-by: Vivek Ellur <vivek.ellur@samsung.com>

Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-27 00:31:06 +02:00