summaryrefslogtreecommitdiff
path: root/src/lib/eio (follow)
AgeCommit message (Collapse)Author
2020-12-14eio: Rename EAPI macro to EIO_API in Eio libraryFelipe Magno de Almeida
Summary: Patch from a series of patches to rename EAPI symbols to specific library DSOs. = The Rationale = This patch is from a series of patches to rename EAPI symbols to specific library DSOs. EAPI was designed to be able to pass `__attribute__ ((visibility ("default")))` for symbols with GCC, which would mean that even if -fvisibility=hidden was used when compiling the library, the needed symbols would get exported. MSVC __almost__ works like GCC (or mingw) in which you can declare everything as export and it will just work (slower, but it will work). But there's a caveat: global variables will not work the same way for MSVC, but works for mingw and GCC. For global variables (as opposed to functions), MSVC requires correct DSO visibility for MSVC: instead of declaring a symbol as export for everything, you need to declare it as import when importing from another DSO and export when defining it locally. With current EAPI definitions, we get the following example working in mingw and MSVC (observe it doesn't define any global variables as exported symbols). Example 1: dll1: ``` EAPI void foo(void); EAPI void bar() { foo(); } ``` dll2: ``` EAPI void foo() { printf ("foo\n"); } ``` This works fine with API defined as __declspec(dllexport) in both cases and for gcc defining as `__atttribute__((visibility("default")))`. However, the following: Example 2: dll1: ``` EAPI extern int foo; EAPI void foobar(void); EAPI void bar() { foo = 5; foobar(); } ``` dll2: ``` EAPI int foo = 0; EAPI void foobar() { printf ("foo %d\n", foo); } ``` This will work on mingw but will not work for MSVC. And that's why LIBAPI is the only solution that works for MSVC. Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com> Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com> Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev> Reviewers: vtorri, woohyun, lucas, jptiz Reviewed By: vtorri, lucas Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12210
2020-12-06eio: Add weak symbolFelipe Magno de Almeida
Summary: Add definition for EAPI_WEAK because this macro will be needed when we change how Eolian generates import/export symbols for the Eio library. = The Rationale = This patch is from a series of patches to rename EAPI symbols to specific library DSOs. EAPI was designed to be able to pass `__attribute__ ((visibility ("default")))` for symbols with GCC, which would mean that even if -fvisibility=hidden was used when compiling the library, the needed symbols would get exported. MSVC __almost__ works like GCC (or mingw) in which you can declare everything as export and it will just work (slower, but it will work). But there's a caveat: global variables will not work the same way for MSVC, but works for mingw and GCC. For global variables (as opposed to functions), MSVC requires correct DSO visibility for MSVC: instead of declaring a symbol as export for everything, you need to declare it as import when importing from another DSO and export when defining it locally. With current EAPI definitions, we get the following example working in mingw and MSVC (observe it doesn't define any global variables as exported symbols). Example 1: dll1: ``` EAPI void foo(void); EAPI void bar() { foo(); } ``` dll2: ``` EAPI void foo() { printf ("foo\n"); } ``` This works fine with API defined as __declspec(dllexport) in both cases and for gcc defining as `__atttribute__((visibility("default")))`. However, the following: Example 2: dll1: ``` EAPI extern int foo; EAPI void foobar(void); EAPI void bar() { foo = 5; foobar(); } ``` dll2: ``` EAPI int foo = 0; EAPI void foobar() { printf ("foo %d\n", foo); } ``` This will work on mingw but will not work for MSVC. And that's why LIBAPI is the only solution that works for MSVC. Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com> Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com> Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev> Reviewers: jptiz, lucas, vtorri, woohyun Reviewed By: vtorri Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12201
2020-07-14docs: Correct the wrong API group name and typo in Evas, Eet, Eina, Eio and ↵Myoungwoon Roy, Kim
Elementary Summary: I found wrong API reference group name in mapbuf, Evas, Eet, Eina, Eio and fixed them. Test Plan: API reference documentation modification only Reviewers: segfaultxavi, stefan_schmidt Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12052
2020-06-25Fix typos - (Part #5)Elyes HAOUAS
Fix some typos Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D12019
2020-06-23Get rid of trailing whitespaces (9 / 14)Elyes HAOUAS
Remove trailing whitespaces Differential Revision: https://phab.enlightenment.org/D12008
2020-06-09eo-files: convert all Eina.Strbuf & Eina.BinbufMarcel Hollerbach
these structs should not be used, but rather the builtin types that exist for it. Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br> Differential Revision: https://phab.enlightenment.org/D11742
2020-05-27refactor buildMarcel Hollerbach
libraries are split into deps, external deps, and pub deps. Evas engines are refactored to use the predefined engine deps. this is preparation work for efl-one. Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D11806
2020-05-26Merge efreet_mime efreet_trash into efreetMarcel Hollerbach
efreet_mime and efreet_trash are now included in libefreet.so. There are compatible libs for libefreet_mime.so libefreet_trash.so, which simple drag in libefreet.so. .pc files also are in place for compatibility. efreet_init & shutdown now initializes and shutdowns trash and mime. The old init functions now simply call efreet_init, efreet_init will then init the trash or mime libs. Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D11807
2020-05-18Revert "Fix EAPI definition by defining EFL_BUILD for each built DLL"Carsten Haitzler (Rasterman)
This reverts commit 3ade45cbc82bea1772c7ad1afb7e1ba5dd67d930.
2020-05-18Fix EAPI definition by defining EFL_BUILD for each built DLLVincent Torri
Summary: EAPI must be defined to dllexport when building DLL, and to dllimport when using these DLL. To achieve this, define EFL_BUILD for each library and module, and set DLL_EXPORT unconditionally. Static library are and will be not supported Test Plan: compilation Reviewers: zmike, raster, jptiz Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11834
2020-03-10doxygen docs: Fix tons of invalid Doxygen commandsXavi Artigas
Mostly typos
2020-02-28doxygen: fix duplicated toc sectionsXavi Artigas
2020-02-12Tabs: remove themXavi Artigas
They have been known to crash some old compilers and have severe performance penalties on non-power-of-two architectures like the Chitauri 13-bit processors. Tabs also cause eye strain, vomits, brain tumors and bad breath.
2019-11-29eo files: Avoid container<ptr(value_type)> usage.Lauro Moura
Summary: Value types are already assumed to be stored by pointer (e.g. `int val = *(node->data);`) This commit just changes the current usage of the `ptr` modifier in the ptr, not affecting the parser. Reviewers: q66, segfaultxavi, bu5hm4n, felipealmeida Reviewed By: q66 Subscribers: cedric, #reviewers, #committers, brunobelo Tags: #efl Differential Revision: https://phab.enlightenment.org/D10769
2019-10-12eio - fbsd - make fd for monitored file close on execCarsten Haitzler (Rasterman)
this fixes T7486
2019-09-26eio/dir: fix null derefMike Blumenkrantz
Summary: above cases may fail, causing target to be null CID 1399103 Depends on D10210 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10211
2019-09-19efl_io_model: next try to fix this race conditionMarcel Hollerbach
what is happening is that a file gets announced through eio_model listing code, at this point of time, the monitor does not yet know about the file. If the file now gets deleted between the annoncing and the learning of the file from the monitor, then the file got an ADD event, but no DEL event. Which is a bug. With this commit there is a new API which asks the monitor if the file already has the knowledge about the files existance, or not. A few monitors like win32 inotify or cocoa do not have context about the file directly, if the OS is now having the same bug, then we are again in trouble, however, we canot do anything about that. In the case of kevent or poll, this asks the context of the monitor if the file is already there. Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D10006
2019-09-18Revert "efl_io_model: remove custom counting logic"Marcel Hollerbach
Summary: This reverts commit d794a0d3d95c3addcb21df75606c444c6e3ed6d8. This breaks Efl_Io_Model. Reviewers: cedric, zmike Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10003
2019-09-12eio: fix warningVincent Torri
Test Plan: compillation Reviewers: raster, cedric, zmike Reviewed By: cedric Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9925
2019-09-06efl: change all occurences of @owned to @moveDaniel Kolesa
2019-09-05docs: minor tweaks to efl_io_modelXavi Artigas
This file's docs are far from complete but this idea had to be written down before it was forgotten. Also, TABS.
2019-09-04efl_io_model: remove custom counting logicMarcel Hollerbach
Summary: this logic brings a few problems: - When files are annonced here, without the monitor having the context of the files, immidiat actions like deletion of the file are resulting in no deletion event. Which is definitly a bug, so we need to wait here for the monitor. - When a new count is annonced before the files are there from the monitor, we are heading towards the same issue - additionally, we might already have files available, due to the custom counting that are not annoncned through the monitor, which means, at a later pointer we are annoncing a new file which is already available via the API. Right now i do not see a way to continue with this code, it caused major issues with our CI and the POLL backend, for now things do work again. Depends on D9624 Reviewers: zmike, stefan_schmidt, cedric, felipealmeida Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9625
2019-08-30eio - don't call cb's after a cancelCarsten Haitzler (Rasterman)
i saw a segv in e/efm .. an eio call was called after it had been canceled. this should never happen. ever. so ensure it does not once an eio file has been canceled. @fix
2019-08-23eio/poll: avoid ever dereferencing the backend's parent in a threadMike Blumenkrantz
Summary: when a monitor is destroyed, it unconditionally and immediately deletes the monitor struct. this means that as soon as the monitor is dead, the backend must never access the parent pointer again if its lifetime exceeds the lifetime of the monitor (such as in threads) the only member of the monitor data used by the fallback monitor is the monitor path, so we can just copy it to the fallback data to avoid ever needing to dereference this pointer fixes reliability issues with efl sentry unit tests @fix Depends on D9708 Reviewers: cedric Reviewed By: cedric Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9709
2019-08-23efl/io: fix race condition with child model deletionMike Blumenkrantz
Summary: if an event is emitted for a child that is added to the model during a call to _efl_io_model_children_list(), it's possible that this child will never be detected by the model's monitor/sentry if it is deleted before the monitor can detect it, which means there will never be a corresponding eio event emitted in this case, ensure that we manually remove this child from the model since we know we've just deleted it this fixes reliability issues with efl io model monitor unit test @fix Reviewers: cedric Reviewed By: cedric Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9708
2019-08-19make mman.h privateVincent Torri
Summary: integrate mman.h to make Evil private to the EFL, as mman.h does not exist on Windows. After a discussion with raster, i include sys/mman.h only on non Windows platform. One issue, though, is that src/modules/emotion/generic/Emotion_Generic_Plugin.h has inlined functions using mmap() Test Plan: compilation on Windows Reviewers: cedric, raster, zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9542
2019-08-08getenv - reduce continually calling getenv for the same vars do onceCarsten Haitzler (Rasterman)
do it once and remember the result from the first one. drops overhead for sure by a chunk i actually could see in perf reports like about 1-2% of cpu...
2019-07-28Eio: enable eio_file_chown if chown is available on the platformVincent Torri
Test Plan: compilation on Windows Reviewers: zmike, raster, cedric Reviewed By: raster Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9393
2019-07-17eo: use efl_provider_{un,}register infrastructure instead of Efl_Loop one.Cedric BAIL
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D9296
2019-07-10efl: use eina_streq for all property operation in model to avoid crash on ↵Cedric BAIL
NULL property name. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D9266
2019-06-05eio: fix Efl.Io.Model properties iterator.Cedric BAIL
It kind of worked by luck for 6 months, but really shouldn't. This is now a custom iterator that will walk the string part of the properties only. It could become a generic iterator if necessary one day, but for now, it is fine just here. T7771 Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D9075
2019-05-29efl/io_model: check for parent object existence before removing wrefMike Blumenkrantz
Summary: if the wref automatically removes this pointer then there's no need to remove the wref on the pointer @fix Depends on D8973 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8974
2019-05-22include evil_private.h in last files, and disable symbolic links on Windows ↵Vincent Torri
in a couple of files Test Plan: compilation Reviewers: zmike, raster, cedric Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8933
2019-05-21Eio: avoid symbolic link on WindowsVincent Torri
Summary: On Windows, symbolic links do not exist Test Plan: compilation Reviewers: zmike, raster, cedric Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8931
2019-05-20remove Evil.h when not necessary, include evil_private.h when necessaryVincent Torri
Test Plan: compilation Reviewers: zmike, raster, cedric Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8925
2019-05-09eio: correctly set reference count of cached child object.Cedric BAIL
Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com> Differential Revision: https://phab.enlightenment.org/D8793
2019-04-21eio: rely on inheritance and reflection for Efl.IoModel path property.Cedric BAIL
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8653
2019-04-02eio: ensure that the monitor starts when it is called toMarcel Hollerbach
Summary: we need to to this here, otherwise we effectfily start the monitor later, which means, we can miss a change in the filesystem. However, this makes things a lot slower. Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8526
2019-04-02efl_io_model: start early on monitoringMarcel Hollerbach
Summary: Little introduction into what eio did before this commit: Efl.Io.Model creation: - direct ls of a directory in a thread (A) - take all the contents of a directory and feed it slowly back into the mainloop - when all events have been feeded back to the mainloop and have been processed: start monitoring (B) However, any file created between (A) and (B) will not be in the model, since not the listing nor the monitoring did caputure it. Hence we need to start monitoring before we actaully start listing. In the callbacks we then check if we already published something. ref T7311 Reviewers: zmike, cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7311 Differential Revision: https://phab.enlightenment.org/D8525
2019-04-02docs: Fix common misspellings in EO filesXavi Artigas
Fixed all appearances of words from this list in EO files: https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines
2019-03-27eio: work around the lack of integration between Ecore_Thread and Eina_Future.Cedric BAIL
Ecore_Thread excpect resolution of the error and done case to be instantaneous, while Eina_Future default scheduler linked with Ecore main loop is build around asynchronous answer. This create a lot of potential. A better patch would be to provide an Ecore_Thread helper that does the integration properly. Sadly we are in release now, so this is basically what an helper would do, but contained inside Efl_Io_Manager. This also solve the same problem as D7970 and D8053, but it should avoid its side effect. Reviewed-by: YeongJong Lee <yj34.lee@samsung.com> Differential Revision: https://phab.enlightenment.org/D8371
2019-03-27eio: Efl.Io.Model should not make request when the object is invalidating ↵Cedric BAIL
itself. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8373
2019-03-27eio: remove unecessary use of weak reference.Cedric BAIL
There is no point in keeping a pointer to the main loop now that we are using efl_future_then. This resolve potential bug with leftover dangling weak reference as efl_future_then do require a free case otherwise. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8374
2019-03-27eio: guarantee that we will at least process one request per loop iteration ↵Cedric BAIL
for very slow system. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8447
2019-03-27eio: rely on efl_future_then to properly protect Eo object during the ↵Cedric BAIL
lifecycle of the future callback. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8334
2019-03-27eio: path and filename property should always remind accessible even in case ↵Cedric BAIL
of error. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8335
2019-03-20docs: Remove obsolete @since tags from EO filesXavi Artigas
Summary: All legacy @since tags have already moved to the *.legacy.h files. EO files are now devoid of @since tags (except some eldbus still needed for legacy). Upcoming patches will add @since 1.22 to those APIs which come out of beta in this release. APIs marked @beta do not need @since tags. Test Plan: Everything builds, EO docs (like DocFX) have no Since tags. Reviewers: zmike, bu5hm4n, lauromoura, cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8430
2019-03-18efl: remove EFL_EO_API_SUPPORT macroDaniel Kolesa
Summary: Since we're now going to be shipping some eo classes as stable, there is no point in keeping the eo api behind a macro, and it should be enabled by default. Another case is beta classes, but those are behind the EFL_BETA_API_SUPPORT guard. This also changes includes around the place where things are clearly broken (such as an included header needing something from another header but that other header being guarded, notably efl_ui_widget.h needing focus manager but focus manager being behind beta in Elementary.h) Reviewers: zmike, cedric, bu5hm4n, stefan_schmidt, segfaultxavi Reviewed By: cedric, segfaultxavi Subscribers: segfaultxavi, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8322
2019-03-14build: add a option to disable eo file installationMarcel Hollerbach
Summary: this is done because .eo files are not stable, and in order to stop people depending on it, its better for now to disable the installation of them for now. ref T7676 Reviewers: stefan_schmidt, cedric, zmike, devilhorns Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T7676 Differential Revision: https://phab.enlightenment.org/D7897
2019-03-11eolian: enable checking of beta/stable contexts in all classesDaniel Kolesa
Summary: This enables all the checks unconditionally, without ignoring classes that don't have an Efl namespace. This required a lot of beta marking to make it build. It most likely doesn't mark types correctly, as that is not fully enabled yet. Reviewers: zmike, cedric, segfaultxavi, bu5hm4n Reviewed By: segfaultxavi Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8266