Commit Graph

1406 Commits

Author SHA1 Message Date
Stefan Schmidt 1d0a636953 eina: fix spelling in new eina_file_statgen API
Introduced in 9b294d6284 the new eina_file_statgen_* API has a typo in
its disable function. Fixing this before it gets out into a release.

Thanks goes to the https://abi-laboratory.pro service for offering their
great API/ABI reports to the open source communities to help finding such
things!

Differential Revision: https://phab.enlightenment.org/D9962
2019-09-16 12:02:42 +02:00
Wonki Kim 979757c845 eina_vpath: add null checking logic on vpath_resolve api
Summary:
there is a patch that add vpath_resolve() call before eina_file_open()
because `path` arg could be NULL, the patch kills some applications.
this patch add null checking logic on vpath_resolve api

Reviewers: bu5hm4n, cedric, Hermet

Reviewed By: Hermet

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9748
2019-08-27 20:25:02 +09:00
Wonki Kim 4c489d5a2e eina_list: fix to check a null argument
Summary:
data should be checked regardless of EINA_MAGIC define,
because it is dereferenced in the following logic.

Reviewers: cedric, bu5hm4n, Hermet

Reviewed By: Hermet

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9750
2019-08-27 20:23:29 +09:00
sub.mohanty@samsung.com 5bd95c9850 eina/array: added eina_array_find() api to eina_array.
Summary: updated test suite for testing the api.

Reviewers: zmike, Hermet, cedric, segfaultxavi

Reviewed By: zmike, segfaultxavi

Subscribers: segfaultxavi, ProhtMeyhet, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9734
2019-08-26 08:31:08 -04:00
Carsten Haitzler 2be2c3c6c3 eina list - make eina list magic optional and for now turn it off
this should bring our list nodes back to 32bytes (or 16 on 32bit)
which is the rounded up libc allocation size anyway expected. less mem
usage but less safety. i haven't seen any magic complainets to do with
eina list for a while now... so let's see.
2019-08-21 20:02:24 +01:00
Vincent Torri 01b987df59 make mman.h private
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-19 09:55:13 -04:00
Carsten Haitzler 807c8e7357 eina file - don't double unlock a lock
thanks to coverity - found this double unlock path in case of error.

fix CID 1403899
2019-08-11 12:47:38 +01:00
Carsten Haitzler fd48be23c2 eina file - make coverity happy and lock+unlock on init
coverity doesnt like inconsistent behavior of code, so make it
consistent even  if pointless as this is during init when we wont have
threads .... yet.

CID 1403903
2019-08-11 12:47:38 +01:00
subhransu mohanty da39f53b95 eina/hash: optimize eina_hash_find() when hash is empty.
Summary:
Check if hash is empty before computing the hash key and look inside the
hash to find data.

Note: could have called the eina_hash_population() api but didn't
      because of extra function call.

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9531
2019-08-09 14:00:03 +09:00
Carsten Haitzler 9149767184 getenv - reduce continually calling getenv for the same vars do once
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-08-08 23:57:02 +01:00
Carsten Haitzler 5f1e44ddad eina log - we exceet 24 domains alrready out of the box, so increase
this avoids more reallocs since we already use more than 24 domains...
go up to 64.
2019-08-07 21:20:00 +01:00
Carsten Haitzler 9b294d6284 eina file - stat generation inexactness support
this is a performance optimization. it brings in a "stat generation".
for now it's disabled by default so we retain previous behavior. this
stops eina file from opening and stating a file every time you open
... it only does it if stat generation is off, or, if the generation
changed since the last time it opened that file. this makes cache hits
not have a 3 syscall cost (open+fstat+close). this optimizes that
lower end of things path. but .. it comes at a cost. if the file
changes before generation ticks over (which this forces to tick over
every time the loop exits idle by default).

now here is something to ask.

1. should we have this on by default and accept the "inexactness"
since you can eina_file_statgen_next() before any call that would do
i/o to force it to look at the real file stat info...
2. should we tick over every idle enter OR every N idle enters  or
every frame we render instead? ... i want to avoid getting a timestamp
or having a timer interrupt often... so what should we do?

at least this introduces the idea, some api's and an env var to turn
this on. it definitely cuts down syscalls during things like creation
of widdgets or objects in large batches etc.
2019-07-28 11:51:15 +01:00
Vincent Torri a6ade14c5e Evil: remove pwd code in Evil and fix compilation failures after the removal
Summary: remove pwd code in Evil

Test Plan: compilation

Reviewers: zmike, cedric, raster

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9420
2019-07-28 09:27:27 +01:00
Vincent Torri 04848c98f2 Eina: define EINA_HAVE_DEBUG_THREADS only if backtrace() in execinfo.h is available
Summary: fix compilation on systems where backtrace() in execinfo.h is not available

Test Plan: compilation on Windows

Reviewers: zmike, cedric, raster

Reviewed By: cedric, raster

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9392
2019-07-28 09:21:53 +01:00
Carsten Haitzler d19e435ff9 reduce syscalls on opening files - roll CLOEXEC into open
on linux open supports() O_CLOEXEC. add test case for this in meson
build and ifdef. this rolls 3 syscalls into 1 as we were doing open,
then fnctl to get and fcntl to set flags.

less syscalls is a good thing as syscalls are not cheap on some
architectures or systems. I've seen a syscall on 1 system take 2-3x
as long as another and another syscall in the same 2 system
comparison take 10x as long. depending on the syscall you may only
have a budget of something like 5000 syscalls "per frame" (60fps)
before you spend all of your frame time just in syscalls not
doing any processing, so we should keep these down if possible
and that is what this does.
2019-07-26 11:43:17 +01:00
Carsten Haitzler 0cd5427c3f build - cmake files - remove old seemingly unused cmake files 2019-07-24 17:53:09 +01:00
Mike Blumenkrantz 481747ae33 meson: fix debug-threads option
it doesn't matter if this doesn't work with eina_debug since this isn't
meant to be used for that kind of debugging

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9359
2019-07-19 15:04:48 -07:00
Vincent Torri 89db9df2d2 Eina vpath: remove support of ~username vpath on Windows
On Windows, one must be in kernel mode to obtain informations of other users

Reviewed-by: Carsten Haitzler (Rasterman) <rasterman.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9339
2019-07-18 09:36:25 +02:00
Cedric BAIL c46a814391 eina: set EINA_VALUE_EMPTY during library init.
This is a work around compiler/linker limit on some system as reported
by Romain Naour.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9348
2019-07-17 14:23:09 -07:00
Mike Blumenkrantz 662572ecfe eina/hash: add direct variants of list append/prepend functions
Summary:
this simplifies the process of manipulating lists inside hashes with a
non-copied key

@feature

Depends on D9205

Reviewers: cedric

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9206
2019-07-10 14:40:42 -04:00
Marcel Hollerbach 223a433be8 eina: add accessors for c arrays
This adds a new API which can be used to get access to a carray via the eina_accessor API.
2019-07-03 07:41:05 +02:00
Marcel Hollerbach bed3fa5904 meson: remove unneeded install: flags
Summary:
when install is not set, meson take the value of install_dir. So when
this is removed, things will continue working correctly.

Reviewers: zmike, stefan_schmidt, cedric, segfaultxavi

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9065
2019-06-03 08:46:29 -04:00
Cedric BAIL 2a3bf30abc eina: add eina_slstr_copy_new_length.
Reviewers: SanghyeonLee, bu5hm4n, zmike, segfaultxavi, lauromoura, felipealmeida, raster

Reviewed By: bu5hm4n, zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7832

Differential Revision: https://phab.enlightenment.org/D8800
2019-05-29 13:49:26 -04:00
Mike Blumenkrantz 9c2547db0c eina/prefix: ignore magic files when running in tree
Summary:
this just can't work.

@fix
Depends on D8951

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8952
2019-05-29 12:29:03 -04:00
Mike Blumenkrantz 655c816539 eina/file: use INFO log level when eina_file_open fails
Summary:
this function is commonly used to detect the existence of files using
its return value. for this purpose, printing warnings any time the file
cannot be opened is spammy and not very helpful in the context of detecting
actual errors.
Depends on D8950

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8951
2019-05-29 12:29:03 -04:00
Marcel Hollerbach 1f0ae2e349 eina: move builtin detection to eina_config.h
Summary: this means we don't need to handle this in the buildtool at all.

Reviewers: vtorri, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8553
2019-05-21 12:28:47 -04:00
Vincent Torri ce9cad3a3b Eina: replace Evil.h with evil_private.h and remove Evil.h when not necessary
Test Plan: compilation

Reviewers: raster, zmike, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8903
2019-05-16 13:48:59 -04:00
Vincent Torri 59f8516ec5 eina vpath: fix warning on Windows, as well as the public path
Differential Revision: https://phab.enlightenment.org/D8866
2019-05-12 11:56:04 +02:00
Cedric BAIL 370917751f eina: update vpath to also support a more classic syntax for variable.
This enable vpath to recognize also ${} as a variable. It does mimic
what Efl.ViewModel provide with Efl.ViewModel.PropertyText and various
other language.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8883
2019-05-11 08:52:07 -07:00
Cedric BAIL 9c992c05d5 eina: refactor and simplify vpath.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8882
2019-05-11 08:52:05 -07:00
Cedric BAIL eb1d47349b eina: always initialize all the field of Eina_Value used by Eina_Promise.
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8794
2019-05-09 09:33:27 -07:00
Vincent Torri b141c42e3f Evil: remove wrapper around getcwd()
Summary: getcwd() is declared in direct.h

Test Plan: compilation

Reviewers: raster, cedric, zmike

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8858
2019-05-08 08:39:36 -04:00
Vincent Torri 770cede2bf eina_file: speed up listing of directories on Windows
Summary:
forbid the creation of short name (legacy of DOS)

Without optimisation

1. using only Win32 API, just iterating over directories (in micro seconds) :
  10 files : 47
  1000 files : 270
  100000 files : 73227
2. using eina_file_dir_list() with a callback which does nothing :
  10 files : 53
  1000 files : 265
  100000 files : 69624

usually there is a small overhead for eina API, which is normal

With optimisation

1. using only Win32 API, just iterating over directories (in micro seconds) :
  10 files : 51
  1000 files : 256
  100000 files : 33345
2. using eina_file_dir_list() with a callback which does nothing :
  10 files : 53
  1000 files : 251
  100000 files : 33832

speed up with 1000 files and more. Twice faster with 100000 files

Test Plan: benchmark program

Reviewers: raster, cedric, zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8842
2019-05-07 11:15:54 +01:00
Mike Blumenkrantz f254cff545 eina: explicitly include Evil.h in eina_inline_slice.x
this file is included by itself (without Eina.h) so it must also include
its dependency headers

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8727
2019-05-06 17:00:50 +02:00
Vincent Torri 7db4714db6 replace strndup with eina_strndup, remove strndup definition in evil and elm_test_dnd
Test Plan: compilation

Reviewers: cedric, zmike, raster

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8814
2019-05-03 13:13:57 +01:00
Vincent Torri e2634eec67 Eina: add eina_strndup() API as inlined function
this add strndup implementation that does not seg fault when string is NULL.
This also implements strndup on Windows.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8790
2019-05-01 17:57:36 -07:00
Vincent Torri 93070e4f0f eina_unicode: return NULL if allocation fails
Reviewers: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8785
2019-04-30 09:24:48 +01:00
Marcel Hollerbach 60af618098 eina_vpath do not pass things through snprintf when not expected.
lets assume a user passes in a string like "blabla%dehydra" then %d will
be resolved by snprintf. Which is probebly not what we want. This
resolves this case and ensures that eina_vpath_resolve does not get
piped through snprintf

Reviewed-by: Dave Andreoli <dave@gurumeditation.it>
Differential Revision: https://phab.enlightenment.org/D8753
2019-04-27 12:31:39 +02:00
Cedric BAIL 805128dbf3 eina: allow copy of EINA_VALUE_EMPTY type.
This is usefule to allow timeout future to be propagated through eina_future_all
or eina_future_race for example.

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8655
2019-04-26 11:32:40 -07:00
Carsten Haitzler 70a7dfff46 eina vpath - fix windows warning as simply as possible
the warning is wrong - so keep things simple
2019-04-18 11:33:40 +01:00
Carsten Haitzler f81dfbfe64 eina vpath - clear up vpath to handle env vars that are too big as fatal 2019-04-17 17:44:12 +01:00
Vincent Torri a30caf333e eina_vpath: port to Windows
Test Plan: test example

Reviewers: raster, cedric, zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8633
2019-04-17 17:44:12 +01:00
Xavi Artigas 68c530080b docs: Fix common misspellings in H files
Fixed all appearances of words from this list in H files:
https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines
2019-04-02 13:28:48 +02:00
Mike Blumenkrantz 69c54cdabb eina_log: reset logging callback to default when null is set as the callback
Summary:
passing null here causes any log message to crash the app and is probably not
the intended result

Reviewers: cedric, segfaultxavi

Reviewed By: cedric, segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8513
2019-03-29 18:57:06 +01:00
Cedric BAIL e859130dd4 eina: prevent double cancel of ongoing dispatched future.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8333
2019-03-27 15:03:08 -07:00
Cedric BAIL 7331f21ea7 eina: always initialize i.
Reviewers: zmike, bu5hm4n, stefan_schmidt, devilhorns

Reviewed By: devilhorns

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8451
2019-03-26 12:05:02 -04:00
Vincent Torri 12e0ee8742 eina_error: On Windows strerror_s() is the same than POSIX strerror_r()
Summary: strerror_r() does not exist on Windows, but strerror_s() does

Test Plan: compilation

Reviewers: cedric, bu5hm4n, zmike

Reviewed By: zmike

Subscribers: zmike, bu5hm4n, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8279
2019-03-13 09:53:17 -04:00
Mike Blumenkrantz 598ce966d8 eina_file: set errno on open fail for win32 build
Summary:
windows does not automatically set errno so we must do it ourselves

@fix
Depends on D8103

Reviewers: vtorri

Reviewed By: vtorri

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8104
2019-03-06 08:37:29 -05:00
Carsten Haitzler b92f09b1d2 eina vpath - change XDG_PUBLIC_DIR to XDG_PUBLICSHARE_DIR
match the spec correctly.
2019-03-05 13:02:56 +00:00
Carsten Haitzler 272d1b5fc2 eina vpath - document that resolved strings need to be freed 2019-03-05 12:12:32 +00:00
Carsten Haitzler e9f07bf60b eina vpath - templates is not a dot dir
fix xdg Templates dir default to not be .Templates
2019-03-05 11:14:46 +00:00
Vincent Torri 8a7cb97e02 Eina: implement strtod in C locale and remove linkl against msvcr100.
Summary:
This fixes compilation on Windows

More precisely edje_cc could not compile emotion edc files, so it was a runtime problem
because of msvcr100 link.

Add more tests than before

Test Plan: compilation

Reviewers: raster

Subscribers: zmike, stefan_schmidt, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7926
2019-02-28 14:36:42 +01:00
Lauro Moura 5861aad185 eina: Declare eina_config.h install dir
Meson from git complains if `install` is set but not `install_dir`.

Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D8036
2019-02-28 13:32:25 +01:00
Stefan Schmidt a405a116c1 eina: safe guard against macro expension error in EINA_*_EQ
Make sure we are use doubel also also in things like EINA_DBL_EQ(a-b, x+y).
Thanks to Vicent for reporting and Xavi for giving me context.

Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Differential Revision: https://phab.enlightenment.org/D8049
2019-02-28 10:22:16 +01:00
Mike Blumenkrantz e7ebf92c92 eina: free vpath hash on shutdown
Summary: this resolves a considerable number of leaks in unit tests

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8020
2019-02-25 17:12:57 -05:00
Vincent Torri f7c560c311 replace hton and ntoh family functions with ones defined in eina
Summary: This fixes especially the execution of edje_cc on Windows

Test Plan: execution of edje_cc

Reviewers: cedric, raster

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7834
2019-02-01 14:25:35 +00:00
Amitesh Singh a016f8e592 eina modinfo: improve eina modinfo guide. 2019-01-29 16:59:45 +05:30
Xavi Artigas c55299ca51 docs: Fix assorted typos in legacy documentation
Samsung reported a long list of typos in our legacy docs, this fixes them.
2019-01-28 13:14:20 +01:00
Cedric BAIL 7889f71c7b eina: fix memory leak when a Eina_Value as promise is returned, but no dispatching Eina_Future is listening on it.
Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D7652
2019-01-23 12:07:17 -08:00
Xavi Artigas a50edaf17b eina: refactor eina_value_*_new.
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7701
2019-01-23 10:54:13 -08:00
Xavi Artigas 06604d5d25 eina: refactor eina_value_*_init.
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7700
2019-01-23 10:54:11 -08:00
Xavi Artigas de608bb203 eina: refactor eina_value_*_get.
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7699
2019-01-23 10:54:09 -08:00
Cedric BAIL 1150cce0bf eina: add Eina_Value helper that convert efficiently to a target native C type.
Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D7650
2019-01-23 10:54:05 -08:00
Xavi Artigas 64a2ef0260 Fix cut&paste error in docs 2019-01-17 11:49:01 +01:00
Cedric BAIL ba80dfe3f4 eina: remove eina_promise_data_get has it lead to risky use.
It seems that use of eina_promise_data_get lead to mostly missuse. As it
duplicate other infrastructure which do not have the same problem. So better
remove it and if we need it back, we can just revert this patch later.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D7578
2019-01-16 16:10:30 -08:00
Cedric BAIL 1bbe4ceb5c eina: remove eina_promise_data_set.
eina_promise_data_set is a misleading API and result in conflicted use by
multiple independent piece of code leading to bug and crash. It is also not
necessary and we can avoid using it completely.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D7575
2019-01-16 14:33:22 -08:00
Cedric BAIL b3d04f7200 Revert "eina: add a function to free Eina_Promise attached data when the promise is destroyed."
A better solution is to actually have no eina_promise_data_set/get at all.

This reverts commit ce56f32270.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D7574
2019-01-16 14:33:20 -08:00
Cedric BAIL d67a7df9ca Revert "fix crashes created by "make efl_loop_promise_new a function""
This serie of patch didn't address the core problem in the design of the
ownership of eina_promise_data_{set/get} usage. It is also redundant with
other infrastructure in eina_promise and so not necessary completely.

This reverts commit de2ec0559b.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D7573
2019-01-16 14:33:18 -08:00
Carsten Haitzler 91990b7cf8 meson - fix pc file versions that were missing mirco version 2018-12-27 11:54:30 +00:00
Carsten Haitzler de2ec0559b fix crashes created by "make efl_loop_promise_new a function"
commit 9b5155c9f1 brought about crashes
- specifically that i saw in terminology because it actually uses
eina_promise_data_set() and the new efl_loop_promise_new basically
took over ownership of that data, but if anyone used
eina_promise_data_set() the data ptr used by this new code would bwe
overwritten, causing segfauls when terminology loses selection
ownership. for days i had mysterious crashes of terminology until i
narrowed it down to the above, so if you have too, then this will fix
it.

what this does is create a data set intercept function callback that
for now is only for use inside efl to everride data sets so they set
data inside the new struct that tracks data. i also had to add and
intercept for eina_promise_data_free_cb_set() as this in theory could
also ber a similar problem.

so perhaps the idea/design of efl_loop_promise_new() is not right and
this kind of thgn has to be internal to eina promise... this means
eina promise and loops are much more tied together.
2018-12-26 17:49:34 +00:00
Cedric BAIL ce56f32270 eina: add a function to free Eina_Promise attached data when the promise is destroyed.
Reviewed-by: Lauro Neto <Lauro Moura <lauromoura@expertisesolutions.com.br>>
Differential Revision: https://phab.enlightenment.org/D7491
2018-12-20 12:42:33 -08:00
Marcel Hollerbach e43f090265 cmake: remove!
This build was never complete and also was not maintained probebly.

It is also dropped in favour of meson which is cool, merged, works & is fast.

Differential Revision: https://phab.enlightenment.org/D7010
2018-12-20 20:07:26 +01:00
Cedric BAIL 3ef87a251b eina: use the correct type for casting to avoid issue on Windows.
Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Differential Revision: https://phab.enlightenment.org/D7458
2018-12-20 09:57:02 -08:00
Carsten Haitzler 10819b4ea5 meson - systemd - fix check to systemd209+ checks that were not done
autofoo did these and set defines code relied on. meson did not. this
fixes that and makes meson do the same checks with the same defines.
2018-12-08 04:47:06 +00:00
Carsten Haitzler 3a075988e4 evas cpu - just rely on eina cpu entirely to avboid feature dups
so evas cpu used to be the thing then eina cpu came and did the same
and evas cpu optionalyl could lsit on top... just move it all to eina
cpu so one central place does this and evas_cpu is purely a compat
wrapper.
2018-12-08 04:46:03 +00:00
Marcel Hollerbach 500a36ba3d meson: add inital support for windows compilation
Differential Revision: https://phab.enlightenment.org/D7416
2018-12-07 13:05:31 +01:00
Cedric BAIL 33c00de365 eo: make efl_future_then have a data pointer in addition of the object pointer.
Summary:
In the case when you have multiple future in flight related to one object, you
couldn't use the previous version of efl_future_then. Now all function calls
take a void* pointer that allow multiple future to have their private data
request data accessible in all the callback.

This should not break released API as Eo.h is not released yet and so
was efl_future_Eina_FutureXXX_then.

Depends on D7332

Reviewers: felipealmeida, segfaultxavi, vitor.sousa, SanghyeonLee, bu5hm4n

Reviewed By: segfaultxavi

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7472

Differential Revision: https://phab.enlightenment.org/D7379
2018-12-07 12:23:11 +01:00
Youngbok Shin 443f63c619 eina: fix a build failure caused by missing 'locale_t' from OSX
In OSX, locale_t is included in xlocale.h
@fix
Differential Revision: https://phab.enlightenment.org/D7395
2018-12-05 11:17:53 +01:00
Marcel Hollerbach 6c8cebf403 Revert "Revert "eina: add locale-independent eina_convert_strtod_c function""
This reverts commit ddd2638758.
2018-12-05 11:17:53 +01:00
Carsten Haitzler 44d010bc39 eina - iterator - remove unused variable - warn 2018-12-04 08:21:49 +00:00
Carsten Haitzler 168fec6995 eina+evas cpu - add theoretical SVE support
SVE is a new-ish ARM vector instruction set like neon... but with
wider vectors (and variable vector sizes). this adds the flags and
hwcaps checks.
2018-12-03 11:04:27 +00:00
Stefan Schmidt ddd2638758 Revert "eina: add locale-independent eina_convert_strtod_c function"
This reverts commit bef1c5cc43.

The commit breaks the build on macos. I gave it soem time to get fixed
up quickly, but its late Friday night in Korea now and this is unlikely
to get fixed until Monday. Revert here until fixed.

./src/lib/eina/eina_private.h:158:1: error: unknown type name 'locale_t'

https://travis-ci.org/Enlightenment/efl/jobs/461790674
2018-11-30 15:30:01 +01:00
Youngbok Shin bef1c5cc43 eina: add locale-independent eina_convert_strtod_c function
strtod's behavior is changed by system locale.
http://man7.org/linux/man-pages/man3/strtod.3.html
https://en.wikipedia.org/wiki/Decimal_separator

Because of this, strtod(0.5) returns 0.0 in some locales.
When a given value string is locale-independent, strtod has to be
replaced to eina_convert_strtod_c function.
Internally, it calls strtod_l function with "C" locale.

@feature

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Differential Revision: https://phab.enlightenment.org/D6644
2018-11-29 16:15:59 -08:00
Cedric BAIL bd474a8829 eina: add eina_multi_iterator_new.
This will return an Iterator that will walk over a serie of iterator.
This technicaly take ownership of the iterator it is walking over and
destroy as it goes and doesn't need them anymore.

Reviewed-by: Vitor Sousa da Silva <vitorsousa@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D7286
2018-11-23 10:13:54 -08:00
Cedric BAIL a8f520188a eina: add test for Eina_Iterator over pure C array.
Reviewed-by: Vitor Sousa da Silva <vitorsousa@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D7285
2018-11-23 10:13:52 -08:00
Cedric BAIL 6b26b3330e eina: add a way to iterate over a pure C array with no NUL terminating element.
Reviewed-by: Vitor Sousa da Silva <vitorsousa@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D7284
2018-11-23 10:13:51 -08:00
Carsten Haitzler df9957a7c4 eina debug - fix 32bit warning for casting down to 32bit ptrs 2018-11-09 12:18:59 +00:00
Carsten Haitzler 665a75378f xxx - fix eina_future_then calls to pass sotrage val - fix warns 2018-11-09 11:43:59 +00:00
Carsten Haitzler e15c663c0a eina inline hash - fix warn about switch case fallthrough
fallthrough is intended so add fallthrough markers to silence warning
2018-11-09 11:43:59 +00:00
Carsten Haitzler 0a2c3557cb eina vpath - warning - remove unused variable 2018-11-09 11:43:58 +00:00
Carsten Haitzler 2ec2d97356 eina vpath - warning - fix constness of string pointer
fixes bad const usage, butnot an actual bug.
2018-11-09 11:43:58 +00:00
Carsten Haitzler 9a4e25a7a8 eina promise - warning fix - init storage field on return
fix a warning but this actually is a bug with storage being left
uninitialized.
2018-11-09 11:43:58 +00:00
Carsten Haitzler 79c783d16f eina file - fix unused param warning by marking as unused
unsued in some ifdef paths, so mark as such to avouid warning noise
2018-11-09 11:43:58 +00:00
Carsten Haitzler ea9ab2dd5a eina debug - fix buffer truncation warning
make buf the size of the unix socket path to truncate early to avoid
warning
2018-11-09 11:43:58 +00:00
Carsten Haitzler 07177d540c eina - vpath - silence buffer size truncation warning
add more space in dest buffer to silence warning about possible
truncation by snprintf.
2018-11-09 11:43:58 +00:00
Carsten Haitzler 2017c169e7 eina - fix warnigns of possibly too msall buffers for large numbers
strings would get  truncated thanks to snprintf but make buffers
bigger to avoid warning noise
2018-11-09 11:43:58 +00:00
Yeongjong Lee 7f77938fa8 eina_lock: add empty do-while in macro
Summary:
empty do-while is needed for safe use.
This patch avoid empty body compiler warning.

Problem case:
if (b)
  EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);

Reviewers: segfaultxavi, Hermet, ManMower, bu5hm4n

Reviewed By: segfaultxavi, bu5hm4n

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7182
2018-10-22 11:34:45 +02:00
Marcel Hollerbach 8d4af0bff6 eina_vpath_xdg: fix fallback strings
when more than one fallback string was used the same variable was
accidently used again and again. This fixes that.

Note: This was not discovered because elementary does not use xdg per
default :)

Differential Revision: https://phab.enlightenment.org/D7174
2018-10-18 14:51:57 +02:00
Marcel Hollerbach 0258946f71 meson: add dl to eina
eina uses dlsym. I forgot this.

Differential Revision: https://phab.enlightenment.org/D7149
2018-10-10 12:55:21 +02:00
Marcel Hollerbach 347dc66ba9 meson: unify system properties
this unifies the system types into 4 boolean flags
This fixes the fact that meson changed the system string accross
versions.

Differential Revision: https://phab.enlightenment.org/D7144
2018-10-05 13:40:29 +02:00
Youngbok Shin 038346dce0 eina debug: fix a double unlock issue
Summary:
It was caught by Covertity.
This patch will remove a potential double unlock issue.
@fix

Test Plan: N/A

Reviewers: zmike, raster, cedric, Hermet, eagleeye

Reviewed By: eagleeye

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7137
2018-10-04 18:58:04 +09:00
Jérémy Zurcher c68ac6c1b7 meson : fix eina/meson.build
issue : when running 'ninja clean' 'buildtype' option is set to 'custom',
patch : set specific options for 'debug' and 'release',
        set default options for any other value of 'buildtype'
Differential Revision: https://phab.enlightenment.org/D7131
2018-10-03 13:07:10 +02:00
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
Alastair Poole 1566861ace macOS: make eina_environment_tmp_get() work as elsewhere.
On macOS the tmp file path always terminated with an additional
separator, causing issues when making file name comparisons.
For example, the Eio test suits would hang due to this.
This patch trims any trailing path. When joining paths
with eina_environment_tmp_get, macOS should behave
similarly as on other architectures.

Differential Revision: https://phab.enlightenment.org/D7128
2018-10-02 16:14:47 +02: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 92c7c16701 eina: Improve doxygen formatting for eina_debug.h
Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7098
2018-09-21 14:34:28 -04:00
Bryce Harrington 9004dd2e9e eina: Grammar improvements
Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7058
2018-09-21 16:55:36 +09:00
Shinwoo Kim fe036fd67f eina_vpath_vdg: free locally allocated memory before return
The eina_vpath_resolve could allocate memory and return it.
But the eina_xdg_env_init does not release it.

*Detected by static analysis with the Coverity
Differential Revision: https://phab.enlightenment.org/D7066
2018-09-21 09:27:55 +02:00
Taehyub Kim 54c68e445b eina_vpath: fix the memory leak
Summary:
 fix the memory leak
@fix

Reviewers: Jaehyun_Cho, bu5hm4n

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7081
2018-09-21 15:05:58 +09:00
Bryce Harrington b5409faf8b eina: Improve explanation of read-only binbuf's
Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7057
2018-09-19 08:41:52 +09:00
Bryce Harrington af8a96ff46 eina: Refer to sin/cos as sine/cosine instead of sinus/cosinus
Summary:
Sinus and cosinus are just the Latin words for sine and cosine, but we
should use the English versions to avoid any possible confusion.

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7059
2018-09-19 08:38:33 +09:00
Bryce Harrington 124ecdfbde eina promise: Fix example error message in docs
Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7060
2018-09-19 08:37:39 +09:00
Bryce Harrington b02257e781 eina cow: Cleanup doxygen syntax
Summary:
The "be careful" advice seems a bit odd in api docs, better to just flag
them with doxygen @note's.

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7061
2018-09-19 08:35:02 +09: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
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
Wonki Kim 3ea6f58ec6 eina: find a real path of dynamic library
In general case, user library path is specifed as /usr/lib/, however,
if the user library path is specified as /lib/ which is a symbolic link to /usr/lib/,
current eina_prefix_new logic will print warning messages.
(actually the logic finds a /usr/lib/ path once a fallback logic runs)

This patch modifies the logic to find a proper path of lib path even if it is specified as symlink.
Differential Revision: https://phab.enlightenment.org/D6869
2018-08-24 15:48:38 +02:00
Marcel Hollerbach cf74462b76 eina_debug: switch to vpath
Summary:
eina debug was using the xdg runtime dir in a wrong manner. Since the
directory should be only used by the user, and the directory should be
be subject of any other usage. Additionally, apps tend to create files
like: $XDG_RUNTIME_DIR/foo.bar which is probebly not what you want in
$HOME.

ref T7107

Depends on D6747

Reviewers: zmike, stefan_schmidt, #committers

Reviewed By: zmike, #committers

Subscribers: #reviewers, cedric, #committers, zmike

Tags: #efl

Maniphest Tasks: T7107

Differential Revision: https://phab.enlightenment.org/D6748
2018-08-20 12:59:15 -04:00
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
Marcel Hollerbach e31ce7b287 eina_vpath: introduce eina_vpath in style of snprintf
Summary:
this can be usefull for later regactor usages.

Depends on D6742

Reviewers: zmike, stefan_schmidt, #committers

Reviewed By: zmike, #committers

Subscribers: #reviewers, segfaultxavi, cedric, #committers, zmike

Tags: PHID-PROJ-55rnlag4d454jfmlmuhu

Differential Revision: https://phab.enlightenment.org/D6743
2018-08-20 12:56:51 -04:00
Marcel Hollerbach aa416afffb eina_vpath: fix homedirectory fetching
Summary:
the fetching of the homedirectorty did not work. pw_dir was never
prepended. Additionally you would get a silent NULL string back
if the system does not support HAVE_GETPWENT.

ref T7107

Depends on D6737

Reviewers: zmike

Reviewed By: zmike

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

Tags: #efl

Maniphest Tasks: T7107

Differential Revision: https://phab.enlightenment.org/D6742
2018-08-20 12:56:30 -04:00
Shinwoo Kim cbe9b6f770 eina_file: check copied using copied
Summary:
From (1) "the following commit" message, the changed condition in this patch
should check if the virtualized file is copied or not.

In eina_file_virtualize
head_padded = 16 * ((sizeof(Eina_File) + slen + 15) / 16);
file->global_map = ((char *)file) + head_padded;

In eina_file_dup
file->global_map != (void*)(file->filename + strlen(file->filename) + 1)

Because of this discord condition makes eina_file_dup copies always.

(1) This is "the following commit":
commit 4766316935
Author: Cedric Bail <cedric@osg.samsung.com>
Date:   Wed Mar 8 10:13:36 2017 -0800

    eina: force copy of not copied virtualized file while doing an eina_file_dup.

    The other way around is pretty much impossible as you don't know who does
    an eina_file_dup and for how long they keep there reference.

    T5234

Reviewers: zmike, Hermet

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6857
2018-08-17 12:42:18 -04:00
Bryce Harrington 1320ba435e eina: Add doxygen in/out tags for safepointer, safety_checks, slice, etc.
Reviewers: netstar

Reviewed By: netstar

Subscribers: netstar, cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6833
2018-08-15 09:54:17 +01:00
Marcel Hollerbach 55a2e77d60 eina_vpath: specilice the eina_vpath headers
Summary: For now its beta, and the since tag is added.

Reviewers: zmike

Reviewed By: zmike

Subscribers: #reviewers, kimcinoo, Hermet, cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6751
2018-08-14 17:09:22 -04:00
Bryce Harrington dd5a78d9c3 eina: Add doxygen in/out tags for rectangle
Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6776
2018-08-08 13:52:25 +09:00
Bryce Harrington 3524d48719 eina: Add doxygen in/out tags for value and value_util
Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6713
2018-07-31 16:40:43 -04:00
Bryce Harrington 14aeb24483 eina: Add doxygen in/out tags for rbtree
Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6709
2018-07-31 15:27:09 -04:00
Bryce Harrington 28d359b00c eina: Add doxygen in/out tags for quaternion
Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6708
2018-07-31 15:16:53 -04:00
Bryce Harrington dc2ad11281 eina: Add doxygen in/out tags for promise
Summary: Also, add some missing param docs, and fix some incorrect ones.

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6698
2018-07-31 02:51:02 -04:00
Bryce Harrington 185f2f55fd eina: Add doxygen in/out tags for mmap and module
Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6691
2018-07-28 11:50:49 -04:00
Bryce Harrington 06e7c859c9 eina: Add doxygen in/out tags for log
Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6690
2018-07-27 20:20:44 -04:00
Bryce Harrington 49554b2b6c eina: Add doxygen in/out tags for lalloc and list
Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6688
2018-07-27 03:59:44 -04:00
Bryce Harrington ff5cc5d988 eina: Add doxygen in/out tags for inlist and iterator
Reviewers: segfaultxavi

Subscribers: segfaultxavi, cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6686
2018-07-26 20:04:46 +09:00
Bryce Harrington 6fb4608458 eina: Add doxygen in/out tags for evlog, file, fp, freeq
Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6673
2018-07-24 08:30:08 -04:00
Bryce Harrington d9515f002a eina: Add doxygen in/out tags for cow, cpu, and debug
Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6642
2018-07-20 10:36:24 -04:00
Bryce Harrington 582d342afe eina: Fix doxygen in/out tags for eina_bezier
Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6630
2018-07-19 15:51:53 +09:00
Bryce Harrington 096c01a818 eina: Add doxygen in/out tags
Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6624
2018-07-18 15:21:07 +09:00
Daniel Hirt 93397449d4 Eina binbuf: add explicit null-check before magic-check
Summary:
Using `--disable-magic-debug` defines EINA_MAGIC_CHECK to always
evaluate to `1`. Eina_Binbuf's null-check relied solely on the
EINA_MAGIC_CHECK, and failed to pick up on the cases where `buf` was
passed as NULL. This has led to  a segfault when a NULL `buf` was passed
in the test suite (see referenced ticket).

This fix adds an explicit NULL check.

Fixes https://phab.enlightenment.org/T7147

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6592
2018-07-16 06:09:38 -04:00
Bryce Harrington 45173fa375 eina: Add doxygen in/out tags for strbuf's and ustrbuf's parameters
Reviewers: devilhorns, Hermet

Reviewed By: Hermet

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6586
2018-07-13 18:23:27 +09:00
Bryce Harrington bdb9a41750 eina: Spelling fixes
Reviewers: devilhorns, Hermet

Reviewed By: Hermet

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6570
2018-07-12 16:27:15 +09:00
Bryce Harrington 6a68e51460 eina: Add doxygen in/out tags for binbuf's parameters
Reviewers: devilhorns, Hermet

Reviewed By: Hermet

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6571
2018-07-12 16:14:42 +09:00
Bryce Harrington d7c67febe1 eina: Improve documentation for binbuf/strbuf/ustrbuf
Summary:
These three classes have essentially the same API, just different
underlying data types.  This patch seeks to improve the docs for all
three while retaining or improving the consistency between them.

Several functions had completely incorrect documentation (looks like
cut-and-paste mistakes), others had missing or incorrectly named
parameter documentation, typographical errors, or other similar issues.
This also cleans up a lot of spelling and grammar errors, defines return
values as part of @return, and reformats/revises doxygen code for
consistency.

There are no changes to code, except some whitespace cleanup.

Reviewers: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6544
2018-07-10 10:55:10 +09:00
Stefan Schmidt 695b44526c eina: remove no longer used function _eina_thread_queue_msg_block_real_free
Summary:
It seems this function is no longer used since some rework. Clean it up.
lib/eina/eina_thread_queue.c:127:1: warning: ‘_eina_thread_queue_msg_block_real_free’ defined but not used [-Wunused-function]

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6537
2018-07-09 10:22:59 -04:00
Bryce Harrington cc345edccd eina: Improve eina_binbuf function documentation
Summary:
Define return values as part of @return.
Cleanup grammar.

Reviewers: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6503
2018-07-04 11:12:57 +09:00
Bryce Harrington f3512bec57 eina: Improve eina_benchmark function documentation
Summary:
Define return values as part of @return.
Clarify that the returned list of files are gnuplot filenames specifically.
Cleanup grammar throughout.

Reviewers: zmike, devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6502
2018-07-03 14:44:41 -04:00
Mike Blumenkrantz 7c50209baa eina/debug: remove global lock for session list access
this list is now only accessed from the main thread so there's no reason
to have a lock for it
2018-07-03 16:10:23 +02:00
Mike Blumenkrantz e7e1560e18 eina/debug: rework session thread destruction to avoid deadlock on shutdown
when debugging was active, this would frequently result in the monitor thread
blocking in a read() call for a fd which had already been closed by the main
thread. the main thread would be waiting for the monitor thread to fail its read()
and destroy itself, but the read() would never end without an interrupt

this reworks the monitor thread destruction to stop relying on the thread to
remove its session from the session list and instead only access the list from
the main thread, allowing sessions to always be immediately destroyed

fix T7103
2018-07-03 16:10:21 +02:00
Carsten Haitzler 194971342b eina debug - fix setuid process shutdown by initting fully except conn
init eina debug fully except for the debug daemon connection that the
setuid check was meant to skip. this fixes T7055
2018-06-27 14:13:00 +09:00
Xavi Artigas 80baf516a3 Revert "eina: provide full string length to vsnprintf to allow for null character"
Summary:
This reverts commit e0f8e65d20 which changed the
behavior of eina_stringshare_nprintf() and was not really needed to fix T6903.

Reviewers: zmike, Jaehyun_Cho, devilhorns

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6903

Differential Revision: https://phab.enlightenment.org/D6431
2018-06-26 12:38:22 -04:00
Mike Blumenkrantz b0cb3b935a eina/threadqueue: use mempool_del for hash free function
Summary:
I typod this in 14ae3e3dec and when using
mempools other than chained, this probably caused all apps to crash on
shutdown

Reviewers: ManMower, devilhorns

Reviewed By: ManMower

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6428
2018-06-25 17:55:25 -04:00
Mike Blumenkrantz 83bab7cab4 eina/lock: add errno wrapping for backtrace() calls in thread debug blocks
Summary:
somehow backtrace() is able to generate EINVAL in certain cases even though
this is not documented anywhere. these irrelevant errors should not be noticed
by users of the api during debugging, as this can cause some tests/apps to
randomly fail without explanation

@fix

Reviewers: ManMower, devilhorns

Reviewed By: ManMower

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6377
2018-06-25 15:20:37 -04:00