Commit Graph

26 Commits

Author SHA1 Message Date
Wander Lairson Costa 65d528a379 Implement eina_thread for native windows
Summary:
eina: Implement Eina_Thread for native windows

The implementation design respects the fact that Eina_Thread is an
uintptr_t. Thus we allocate the thread struct in the heap and return a
pointer to it.

As such, we store the created thread structure in the target thread
TLS slot. For threads that were not created through eina API, in
eina_thread_self we allocate a new structure, push it to the TLS slot
and mark it to be freed on thread exit.

Reviewers: jptiz, vtorri, cedric, walac

Reviewed By: jptiz, cedric

Subscribers: raster, cedric, #reviewers, #committers, lucas

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12037
2021-04-17 16:00:32 -03:00
Marcel Hollerbach 40a62ddf94 eina: introduce Eina_Abstract_Content
A little abstraction to have abstract data content bound to a type.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D11018
2020-03-08 10:59:22 +01:00
Ali Alzyod 5137f6d143 eina: add new range Data type
Summary:
Introduce new data type (Eina.Range)  which represent range (part of series)

**eina_range_max_get**
**eina_range_intersect**
**eina_range_union**
**eina_range_contains**
**eina_range_equal**

Reviewers: cedric, woohyun, bu5hm4n, segfaultxavi, zmike

Reviewed By: woohyun

Subscribers: vtorri, cedric, #committers, #reviewers

Tags: #efl

Maniphest Tasks: T8570

Differential Revision: https://phab.enlightenment.org/D11133
2020-01-23 06:54:44 +09: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 adc601aca2 tests: add instrumentation to existing tests to find slow tests
efl_check.h must be included and the EFL_START/END_TEST macros must be
used in place of normal START/END_TEST macros

timing is enabled when TIMING_ENABLED is set
https://phab.enlightenment.org/w/improve_tests/

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:25 +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 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 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
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
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
Cedric BAIL edc753d1a2 eina: add tests suite for Eina_Safepointer. 2016-06-10 14:09:41 -07:00
Felipe Magno de Almeida 1d314828f7 eina: add tests for promises 2016-04-05 11:35:12 -07: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
Subhransu Mohanty 6afb497d91 eina: add test for Eina_Bezier. 2015-08-07 14:33:52 +02:00
Vivek Ellur 1155176aa5 eina: add quaternion test in eina suite and fix the test case errors
Summary:
Fixed eina_test_quaternion_conjugate and eina_test_quaternion_matrix which
were failing and also added the quaternion test in eina suite

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

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-29 14:56:23 +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
vivek 48dea34240 eina: add test case for eina_crc function in eina module.
Summary:
I added test cases using seed 0xffffffff, I was not
able to get crc value for different seeds online. Checked some of the links, but they are
using entirely different logic and value was not matching for other seed value.

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

Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-07 09:53:09 +02:00
vivek a6b5ee94f0 eina: add test cases for eina_xattr functions.
Summary:
Add eina_test_xattr.c file for testing eina xattr functions and added test
cases for eina_xattr_set and eina_xattr_fd_set functions. Those tests need
a directory where the underlying file system allow xattr. Usually /tmp is
running on tmpfs that doesn't support today xattr. This test won't be run
if we are not provided with an existing proper directory.

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

Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-06 20:19:21 +01:00
kabeer khan 3ad485b8e0 eina: add test cases for Eina_Trash
Summary:
New test case for Eina_Trash was added

Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: raster, cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-09-22 14:59:27 +02:00
Cedric Bail fe5dd4bcda eina: add test for old ABI supported function, but not exposed anymore. 2013-10-25 20:16:10 +09:00
Cedric Bail 577ae1debc eina: let's add some straight forward test. 2013-10-16 16:51:41 +09:00
Vladislav Brovko 21505d1edf eina: Eina_Tmpstr test for eina_tmpstr_add, eina_tmpstr_del.
Signed-off-by: Cedric BAIL <cedric.bail@free.fr>
2013-03-11 10:45:41 +09:00
Ulisses Furquim eade5b8251 eina/tests: add basic Eina_Barrier test
Also rearranged test suite creation to allow setting the timeout in
the build callback.



SVN revision: 82415
2013-01-08 14:10:33 +00:00
Cedric BAIL 0e50f122e5 efl: Add eina copy on write infrastructure.
SVN revision: 82396
2013-01-08 09:17:56 +00:00
Vincent Torri 785f2a6b3a merge : add eina
currently, examples, tests and benchmark are not set. That's the next things i'll do


SVN revision: 76710
2012-09-16 10:57:48 +00:00