Commit Graph

901 Commits

Author SHA1 Message Date
Marcel Hollerbach 46d464e5bf here comes meson
a new shiny buildtool that currently completes in the total of ~ 4 min..
1 min. conf time
2:30 min. build time
Where autotools takes:
1:50 min. conf time
3:40 min. build time.

meson was taken because it went quite good for enlightenment, and is a traction gaining system that is also used by other mayor projects. Additionally, the DSL that is defined my meson makes the configuration of the builds a lot easier to read.

Further informations can be gathered from the README.meson

Right now, bindings & windows support are missing.

It is highly recommented to use meson 0.48 due to optimizations in meson
that reduced the time the meson call would need.

Co-authored-by: Mike Blumenkrantz <zmike@samsung.com>

Differential Revision: https://phab.enlightenment.org/D7012
Depends on D7011
2018-10-02 17:22:50 +02:00
junsu choi 6f339cdc2a ecore_timer: Add docs for ecore_timer legacy functions
Summary:
Find docs of missing legacy functions
from 47cdbe3 and add them.

Test Plan: make doc

Reviewers: cedric, Hermet, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7118
2018-09-27 11:14:04 +02:00
Yeongjong Lee 5e388350f0 efl_exe: check fcntl return
Summary: Found by coverity

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7110
2018-09-27 13:58:08 +09:00
Taehyub Kim d8182638f2 ecore_main: fix the invalid return value
Summary:
fix the invalid return value
@fix

Reviewers: Jaehyun_Cho, raster, Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7080
2018-09-21 14:46:50 +09:00
Derek Foreman 4dc1e8273d ecore: Add new way to register animators
Summary:
We have back-ends that can generate their own tick sources, but
ecore_animator_add()/ecore_animator_timeline_add() gives no indication
which backend the animator is running on.  This means that all animators
have to cause all currently in use backends to tick.

For example, if under wayland 4 application windows are open, all 4
windows will create ticks when any animator is present.

These new animator APIs that take an evas object allow us to figure out
out the backend and only cause the appropriate one to tick.

Depends on D7040

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7041
2018-09-18 09:42:38 -05:00
Derek Foreman 448c7ca2ce ecore_anim: Move struct Ecore_Animator to private header
Summary:
We're going to use this in ecore_evas shortly.

Depends on D7039

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7040
2018-09-18 09:42:34 -05:00
Shinwoo Kim ad97989b28 ecore_event: initialize uninitialized variable
Summary:
The following commit (1) made an abort (2)

(1) commit d1e4c6bab8
Author: Jean Guyomarc'h <jean@guyomarch.bzh>
Date:   Mon Aug 27 12:04:35 2018 +0900

    ecore: fix built-in event types generation

(2) abort
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)
/lib/x86_64-linux-gnu/libc.so.6(+0x8037a)
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)
/home/kimcinoo/install/lib/libecore.so.1(+0x237d7)
/home/kimcinoo/install/lib/libeo.so.1(efl_destructor+0x64)
/home/kimcinoo/install/lib/libeo.so.1(+0x18029)
/home/kimcinoo/install/lib/libeo.so.1(efl_unref+0x44c)
/home/kimcinoo/install/lib/libecore.so.1(+0x201f2)
/home/kimcinoo/install/lib/libecore.so.1(ecore_shutdown+0x145)
/home/kimcinoo/Upstream/efl/src/tests/ecore/.libs/lt-efl_app_suite(+0xb85d)
/home/kimcinoo/install/lib/libcheck.so.0(srunner_run_tagged+0xa13)
/home/kimcinoo/Upstream/efl/src/tests/ecore/.libs/lt-efl_app_suite(+0xead9)
/home/kimcinoo/Upstream/efl/src/tests/ecore/.libs/lt-efl_app_suite(+0x4ade)
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)
/home/kimcinoo/Upstream/efl/src/tests/ecore/.libs/lt-efl_app_suite

And following commit (3) fixed the abort.

(3) commit 3f306491a3
Author: Yeongjong Lee <cleanlyj@naver.com>
Date:   Mon Sep 3 15:55:13 2018 +0000

    ecore_event: fix ecore event handler iterator range

The above commit fixed the abort though, we could access uninitialized memory
and make another abort again. This would prevent such unwanted case.

Reviewers: Hermet, YOhoho, bu5hm4n, netstar

Reviewed By: netstar

Subscribers: netstar, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6970
2018-09-04 11:54:17 +01:00
Yeongjong Lee 3f306491a3 ecore_event: fix ecore event handler iterator range
event handler start at 1 (see _ecore_event_message_handler_type_new and
_ecore_event_message_handler_efl_object_constructor) so that handlers[0] is not
allocated. this patch avoid invalid memory access.

this fixes T7349
Differential Revision: https://phab.enlightenment.org/D6966
2018-09-03 18:13:32 +02:00
Yeongjong Lee 02d83ebcd4 docs: Fix typos in API reference doc and comments.
Reviewers: Hermet, segfaultxavi

Reviewed By: Hermet, segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6948
2018-08-31 17:45:31 +09:00
Myoungwoon Roy, Kim e06a9b6acf docs: Fix typos and some wrong expressions in API reference doc.
Summary: I had fixed some typos and some wrong expressions in API reference doc

Test Plan: N/A

Reviewers: raster, zmike, Hermet, segfaultxavi

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6943
2018-08-30 14:01:21 +09:00
Mike Blumenkrantz 1d7fb47f04 efl/timer: correctly handle timer freeze during construction
Summary:
it is not correct to throw an error when methods are called during
construction

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: Hermet, cedric, #reviewers, #committers

Tags: #efl_main_loop

Differential Revision: https://phab.enlightenment.org/D6787
2018-08-27 12:09:49 +09:00
Jean Guyomarc'h d1e4c6bab8 ecore: fix built-in event types generation
Summary:
Ecore internally uses 10 events, from ECORE_EVENT_SIGNAL_USER=1 to
ECORE_EVENT_SYSTEM_TIMEDATE_CHANGED=10. The Ecore.Event.Message_Handler
singleton that holds the counter of events is initialized with -1.
This is followed in _ecore_event_init() by ten calls to
ecore_event_message_handler_type_new(), which increase the counter of
event by one each.

This results in an event counter to be 9 (-1 + 10) at the end of the
initialization of ecore_events. This means that the next event to be
created will have a value of 10, which will overlap with
ECORE_EVENT_SYSTEM_TIMEDATE_CHANGED. As such, these two distinct events
will be aliased and their associated handlers will be called at
unexpected times, with unexpected data.

By changing the constructor value from -1 to 0, we prevent this event
aliasing.

Fixes T6605

Reviewers: zmike, Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers, zmike

Tags: #efl

Maniphest Tasks: T6605

Differential Revision: https://phab.enlightenment.org/D6894
2018-08-27 12:04:36 +09:00
Yeongjong Lee 15cc9a65aa ecore_pipe: remove null check condition and fix segfualt on Windows
Summary:
This reverts commit 4917910b49.

4917910b break backward compatibility.

Reproduction:
   void pipe_handler(...);

   pipe = ecore_pipe_add(pipe_handler, NULL);
   ecore_pipe_write(pipe, NULL, 0);

Because of the null check condition, pipe_handler isn't called after 4917910b.
Some apps behavior which is written to expected to call pipe_handler was broken.

also, this patch fixed segfault during build on Windows

Test Plan: make on Windows

Reviewers: raster, zmike, vtorri

Reviewed By: zmike, vtorri

Subscribers: woohyun, cedric, #reviewers, #committers, zmike, vtorri

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6824
2018-08-17 12:42:35 -04:00
Mike Blumenkrantz 8e6d66450d ecore/main: only update loop_time during loop iteration if the change is monotonic
Summary:
in the case where the user has called loop_time_set with a value in the future,
avoid setting the loop time to something that would potentially cause a callback
to occur with a loop_time value before a previous occurrence of that callback

@fix

Reviewers: ManMower

Reviewed By: ManMower

Subscribers: ManMower, #reviewers, cedric, #committers

Tags: #efl_main_loop

Differential Revision: https://phab.enlightenment.org/D6764
2018-08-14 17:09:32 -04:00
Hosang Kim a92274f811 ecore: fix that timers are not called in the order they were registered.
Summary:
Timers are not called in the order they were registered.
Because when current timer is deleted, getting next timer is called twice.

Test Plan:
<error>
Timer1 expired after 0.001 seconds.
Timer3 expired after 0.001 seconds.
Timer5 expired after 0.001 seconds.
Timer7 expired after 0.001 seconds.
Timer2 expired after 0.001 seconds.
Timer6 expired after 0.001 seconds.
Timer4 expired after 0.001 seconds.
Timer8 expired after 0.001 seconds.
<correct>
Timer1 expired after 0.001 seconds.
Timer2 expired after 0.001 seconds.
Timer3 expired after 0.001 seconds.
Timer4 expired after 0.001 seconds.
Timer5 expired after 0.001 seconds.
Timer6 expired after 0.001 seconds.
Timer7 expired after 0.001 seconds.
Timer8 expired after 0.001 seconds.|

{F3268233}

Reviewers: Hermet, Jaehyun_Cho, zmike, SanghyeonLee

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl_tests

Differential Revision: https://phab.enlightenment.org/D6700
2018-08-02 09:14:15 -04:00
Mike Blumenkrantz 8f05d03639 ecore/signal: use a volatile int to prevent further SIGPIPE during shutdown
Summary:
attempt to prevent any access of the signal pipe once signal handlers are
removed in order to avoid triggering a SIGPIPE which would kill the app
Depends on D6670

Reviewers: ManMower

Reviewed By: ManMower

Subscribers: cedric, #committers

Tags: #efl_main_loop

Differential Revision: https://phab.enlightenment.org/D6672
2018-07-23 17:30:56 -04:00
Mike Blumenkrantz bf92738a57 ecore/signal: delete signal pipe after unsetting signal handlers
Summary:
if a signal is already in the signal pipe when close() is called,
this will trigger a SIGPIPE. if the signal handler exists, this will
cause the signal handler to infinitely recurse when trying to print
the error messages from write()ing the signal data to the close()d
pipe

fix T7158

Reviewers: ManMower

Reviewed By: ManMower

Subscribers: cedric, #committers

Tags: #efl_main_loop

Maniphest Tasks: T7158

Differential Revision: https://phab.enlightenment.org/D6670
2018-07-23 17:30:54 -04:00
Mike Blumenkrantz 44bce025fa ecore: remove exit_signal_received conditional from windows build
Summary:
windows does not include ecore_signal.c, so this is not a defined symbol

lib/ecore/.libs/lib_ecore_libecore_la-ecore_anim.o: In function `timer_tick_notify':D:\Documents\MSYS2\home\vtorri\gitroot\efl3\src/lib/ecore/ecore_anim.c:372: undefined reference to `exit_signal_received'lib/ecore/.libs/lib_ecore_libecore_la-ecore_anim.o: In function `ecore_animator_custom_tick':D:\Documents\MSYS2\home\vtorri\gitroot\efl3\src/lib/
ecore/ecore_anim.c:940: undefined reference to `exit_signal_received'

ref 6405a5a68c

Reviewers: vtorri, devilhorns

Reviewed By: vtorri

Subscribers: cedric, #committers

Tags: #efl_build

Differential Revision: https://phab.enlightenment.org/D6648
2018-07-20 15:21:28 -04:00
Alastair Poole b00f0e0630 ecore_main: silence warning when compiling.
Summary:
Silence compilation warning.
There is an ifdef'd block of code which accesses obj but
I don't think it's in use in production?

Test Plan: Build EFL and watch for warning.

Reviewers: #committers, zmike, Hermet

Reviewed By: #committers, Hermet

Subscribers: cedric

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6628
2018-07-19 15:53:49 +09:00
Mike Blumenkrantz 6405a5a68c ecore: immediately block animator ticking upon receiving an exit signal
Summary:
when an exit (SIGINT, SIGQUIT, SIGTERM) signal is received, the ui should
immediately stop updating in order to present the user with an instant
response

this uses a simple volatile int to block any ticks which begin after the
signal is received; if a signal is received during a tick then it will complete
normally

fix T7000
Depends on D6589

Reviewers: ManMower

Reviewed By: ManMower

Subscribers: cedric, #committers

Tags: #efl_main_loop

Maniphest Tasks: T7000

Differential Revision: https://phab.enlightenment.org/D6590
2018-07-13 15:40:55 -04:00
Mike Blumenkrantz dab2a9ca68 ecore/animator: break out _ecore_animator_flush() from tick function
Summary: no functional changes

Reviewers: ManMower

Reviewed By: ManMower

Subscribers: cedric, #committers

Tags: #efl_main_loop

Differential Revision: https://phab.enlightenment.org/D6589
2018-07-13 15:40:50 -04:00
Xavi Artigas f21fd7e2fd ecore: fix order of signal fd shutdown
Summary:
When closing the fd handler, it checks if the fd is already closed and prints
an annoying  warning: "fd %d closed, can't remove from epoll - reinit!"
We need to close the handler first and then the actual fd.
I am not familiar with this part of the code, but this fix removes the warnings
and does not seems to have adverse effects.

Test Plan: It had warnings before and now it doesn't, haven't observed any other adverse effect.

Reviewers: raster, zmike, devilhorns

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6561
2018-07-12 09:17:26 -04:00
Derek Foreman 51d1360a18 ecore_anim: Simplify timeline terminal condition
Summary:
We should only ever have a pos of 1.0 once, the current terminal
condition gives the impression that it might be possible to have
more than one 1.0 firing.

This would break a lot of code.

No functional change intended.
Depends on D6464

Reviewers: devilhorns, zmike

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6465
2018-06-28 13:12:04 -05:00
Mike Blumenkrantz b455617500 ecore/thread: flush main loop threads during ecore_thread_wait()
this avoids the case where the main loop is waiting on a thread
and that same thread is waiting on the main loop

@fix

Differential Revision: https://phab.enlightenment.org/D6438
2018-06-28 18:08:45 +02:00
Mike Blumenkrantz 04d209e238 ecore/thread: flush main loop threads while waiting during shutdown
if a thread is actively waiting on the main loop in order to proceed
with its exit, a flush here avoids the case where the thread waits
until the main loop has exited

Differential Revision: https://phab.enlightenment.org/D6437
2018-06-28 18:08:45 +02:00
Mike Blumenkrantz 2ee83cc28d ecore/thread: increase loop iterations when waiting during shutdown
since this is now a smaller wait interval, looping more times helps
ensure success for threads which have longer blocking operations
between lifetime checks

Differential Revision: https://phab.enlightenment.org/D6436
2018-06-28 18:08:45 +02:00
Mike Blumenkrantz 6eaa57852a ecore/thread: greatly reduce usleep time during shutdown loop
Summary:
now that ecore accurately waits on all threads while exiting, this
loop needs to run much more frequently in order to avoid waiting for
an unreasonably long time when exiting

Reviewers: ManMower, devilhorns

Reviewed By: ManMower

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6427
2018-06-25 17:27:18 -04:00
Mike Blumenkrantz 1dc706a3dd ecore/thread: track "no_queue" threads
these threads are still managed by the main loop, meaning they must be
accounted for so that they can be waited on if necessary during shutdown

this resolves some issues where ecore-con threads would persist after the
main thread had exited or called ecore_shutdown

@fix
fix T7041

this is the final version of the patch and not the mangled version which
was previously committed

Differential Revision: https://phab.enlightenment.org/D6354
2018-06-25 16:54:24 -04:00
Mike Blumenkrantz 8d2f5d7a7d Revert "ecore/thread: track "no_queue" threads"
This reverts commit 1e47db6a71.

somehow arc managed to land an old revision of this which was not consistent
with the final version of D6354
2018-06-25 16:53:40 -04:00
Mike Blumenkrantz 1e47db6a71 ecore/thread: track "no_queue" threads
these threads are still managed by the main loop, meaning they must be
accounted for so that they can be waited on if necessary during shutdown

this resolves some issues where ecore-con threads would persist after the
main thread had exited or called ecore_shutdown

@fix
fix T7041

Differential Revision: https://phab.enlightenment.org/D6354
2018-06-25 15:14:31 -04:00
Mike Blumenkrantz 198016d503 ecore: reformat ecore_thread.c
no functional changes

Differential Revision: https://phab.enlightenment.org/D6352
2018-06-25 15:14:30 -04:00
Thierry HUCHARD 65da58726f ecore/main: fix build with --enable-g-main-loop
this resolves compiler errors with this option which resulted from refactoring

fix T7011
2018-06-22 17:42:22 -04:00
Mike Blumenkrantz ef538cd1ed ecore/glib: add #ifdef guards for newly added includes
these headers are not available on all platforms (e.g., windows) and so
the corresponding #ifdef checks must be used in order to correctly include
them

ref 1adb73cef8
ref T5725
fix T7063

Differential Revision: https://phab.enlightenment.org/D6369
2018-06-22 15:26:44 -04:00
Mike Blumenkrantz 83124559cc ecore: call eina_debug_fork_reset() in fork reset function
Summary:
ensure that this occurs as expected when forks happen

note that this is already being actively tested in the elm unit tests

Depends on D6307

Reviewers: ManMower, devilhorns

Reviewed By: ManMower

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6308
2018-06-19 13:55:36 -04:00
Zbigniew Kempczyński 1adb73cef8 ecore - handle G_IO_ERR conditions for net sockets
Glib integration with using of select() syscall doesn't properly
propagates G_IO_ERR condition for network sockets. Problem relies in
_ecore_glib_context_poll_to() where rewriting filedescriptor events to
GPollFD structures reside.

This fixes T5725

@fix
2018-06-17 15:59:02 +09:00
Derek Foreman 07d7ae4657 ecore: Use poller instead of animator for mem stats
Summary:
Animators shouldn't be used as a general purpose timer mechanism,
we could use a timer, but a poller seems to make more sense as
it limits the impact of the instrumentation on the code it's
instrumenting.

Reviewers: stephenmhouston, zmike

Reviewed By: stephenmhouston, zmike

Subscribers: stephenmhouston, cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6251
2018-06-06 12:41:05 -05:00
Cedric BAIL b59911d5af ecore: during shutdown their is no need to delay anything. 2018-05-24 16:02:21 -07:00
Cedric BAIL c49d293915 ecore: allow for NULL file handler request. 2018-05-24 16:02:20 -07:00
Cedric BAIL f7b08c4537 ecore: properly cleanup variable on shutdown, so that cycling another init doesn't crash. 2018-05-24 16:02:20 -07:00
Cedric Bail a16d127997 ecore: because fd_handler do not have the main loop as parent, the main loop can die before them. 2018-05-24 16:02:19 -07:00
Cedric Bail 6bb450d7ee ecore: first invalidate the loop and its children, then destroy all the object capability.
Differential Revision: https://phab.enlightenment.org/D6089
2018-05-24 16:02:18 -07:00
Cedric BAIL 93893def9f ecore: properly handle shutdown of Efl.Loop children by using invalidate.
Differential Revision: https://phab.enlightenment.org/D6077
2018-05-24 16:02:18 -07:00
Cedric BAIL 23281bc54a ecore: disable signal during shutdown.
Differential Revision: https://phab.enlightenment.org/D6076
2018-05-24 16:02:18 -07:00
Cedric BAIL 266dabc096 ecore: force close during invalidate of Efl.Io.Buffered_Stream.
Differential Revision: https://phab.enlightenment.org/D6074
2018-05-24 16:02:18 -07:00
Xavi Artigas 0f47f53f57 efl: rename Efl.Task.* -> Efl.Task_* 2018-05-23 17:33:47 +02:00
Xavi Artigas 4396687b6c efl: rename Efl.Exe.* -> Efl.Exe_* 2018-05-23 17:33:47 +02:00
Xavi Artigas 35bbedc96f efl: Add missing event types
Summary:
All events must have a type now, otherwise bindings don't know how to handle
the event_info field.
Most of the missing event types were actually "void" (no event_info present).
Some struct definitions had to be moved to eo instead of h files, so they
are available to bindings. Some have not, and are marked with FIXME.
Some namespaces have been fixed (like Efl_Event_Cb -> Efl.Event_Cb).

In general, there are hundreds of changed files, but mostly to add a type which
was not present before, so there's no harm done.
Also, A lot of FIXMEs have been added which should be, like, fixed.
For example, some events can send different types of event_info, which is
very inconvenient (and error prone).

Test Plan: make with c# bindings works, make check and make examples work too.

Reviewers: cedric, q66, lauromoura

Subscribers: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6169
2018-05-19 01:42:26 +02:00
Daniel Kolesa 577c00789a eolian: second batch of unused import removals
This fixes all remaining occurences introduced by false negatives
in 6bcd70f01d. The rest was already
fixed in 6be3809c04.
2018-05-13 18:13:12 +02:00
Daniel Kolesa 6be3809c04 eolian: first batch of unused import removals
Initial results of our static analysis showed a bunch of unused
imports or imports used only for documentation references. In the
first case, remove entirely, in the second case, change to 'parse'
in order to keep references working.

The static analysis is not perfect and yields false negatives for
certain cases, so there will be a second batch later.
2018-05-13 17:28:47 +02:00
Carsten Haitzler 9cf5b97a8a ecore - dont rely on commons merge for func ptr
use a proper extern delcaration to do this not a extern func ptr.
fixes compile errors with lto on.
2018-05-09 23:58:48 +09:00