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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Summary:
this changes the explicit pthread usage (and reimplementation of eina_thread_create)
to just use eina function calls. it also causes the thread to start and stop when
profiling is enabled and resolves some possible errors which could occur after
a fork or when trying to compile under windows
pthread usage: this code appears to have been 100% copied from eina_thread.c, and it
isn't clear to me why existing eina_thread api was not used. this has no functional
benefit, but it makes the code more readable
thread lifetime: there is no need to have a thread running at all times for a feature
which will be rarely used and which must be explicitly enabled by the user
windows: this file previously generated a lot of compiler warnings from unused functions
and variables since nothing here is available under windows. the entire file is now
a giant #ifndef _WIN32 to avoid any compile warnings or unexpected runtime behavior
fix T7055
Depends on D6371
Reviewers: ManMower, vtorri, devilhorns
Reviewed By: ManMower
Subscribers: cedric, #committers
Tags: #efl
Maniphest Tasks: T7055
Differential Revision: https://phab.enlightenment.org/D6372
Summary:
previously this used to mean 'the number of ms that a lock can wait for
until abort() is called once the lock is acquired' and it was useful
when trying to find contention issues with locks
unfortunately this required a bit of reading into the code to determine,
and it made the common case of setting values to 1 fail in some cases,
as this is a very short amount of time. also the documentation explicitly
gives '1' as an example setting for this variable, which will cause immediate
abort() in most cases when debugging was enabled since things are much slower
this variable now is the number of usec that a lock can wait for before abort()
is called, and the lowest value that will be checked for abort()ing is 100, meaning
that '1' is valid again
Depends on D6375
Reviewers: ManMower, devilhorns
Reviewed By: ManMower
Subscribers: cedric, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6376
Summary:
when debugging thread issues, it's not actually helpful to immediately
deadlock--this defeats any attempt at debugging. instead, call trylock first
in order to detect a possible deadlock and then throw an error which can be
caught by the user
Depends on D6374
Reviewers: ManMower, devilhorns
Reviewed By: devilhorns
Subscribers: cedric, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6375
there's no need to reimplement mempools here when we already have a great
mempool api
this makes the code slightly more readable
Differential Revision: https://phab.enlightenment.org/D6353
Summary:
casting here is safe, as before we check and return on size < 1.
Depends on D6379
Reviewers: devilhorns, Hermet
Reviewed By: Hermet
Subscribers: cedric, #committers, zmike
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6380
This reverts commit 0d91088d0f.
It also includes a workaround for OSX where RT signals aren't
supported due to kernel age (too old a fork of freebsd). fixes D6310
and T7029
This include is necessary according to POSIX. Without it, build
fails on certain platforms (QNX). It may already be included
implicitly in some of those files, but declare intent.
Fixes T6667.
Summary:
if profiling is not enabled then reaching this signal handler will always
result in a crash
moreover, the signal handler has no functional value if profiling is not active,
so do not add it until that point
fix T7028
@fix
Depends on D6311
Reviewers: ManMower, devilhorns
Reviewed By: ManMower
Subscribers: cedric, #committers
Tags: #efl
Maniphest Tasks: T7028
Differential Revision: https://phab.enlightenment.org/D6312
fork() kills this entire subsystem and leaves its internals
in an inactive but allocated state, so it's necessary to explicitly restart
everything in order to guarantee behavior
@feature
Differential Revision: https://phab.enlightenment.org/D6307
this should not remain active after eina has been deactivated, so ensure
that everything stops as expected
ref T7019
Differential Revision: https://phab.enlightenment.org/D6306
this should not remain active after eina has been deactivated, so ensure
that everything stops as expected
ref T7019
Differential Revision: https://phab.enlightenment.org/D6305
this should not remain active after eina has been deactivated, so ensure
that everything stops as expected
ref T7019
Differential Revision: https://phab.enlightenment.org/D6304
this basically breaks all thread usage if it happens, so ensure that the
threads infrastructure stays active for as long as eina is active
@fix
Differential Revision: https://phab.enlightenment.org/D6303
eina is guaranteed to crash in any process without this call now that
eina_debug exists and requires threads
@fix
Differential Revision: https://phab.enlightenment.org/D6302
this should be done in a single location to avoid dependency conflicts
and make the code easier to read
Differential Revision: https://phab.enlightenment.org/D6301
Summary:
the 'first' member of this struct is used simultaneously across
threads and can have conflicting read/write operations occurring at this
time
as int operations are not guaranteed to be atomic, ensure that we are
using atomic operations or locking as necessary
@fix
Depends on D6299
Reviewers: ManMower, devilhorns
Reviewed By: ManMower
Subscribers: cedric, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6300
Summary:
this moves lock calls outside #ifdef blocks to make the code more
readable
no functional changes
Depends on D6298
Reviewers: ManMower, devilhorns
Reviewed By: ManMower
Subscribers: cedric, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6299
Summary:
this would deadlock in some cases
@fix
Depends on D6297
Reviewers: ManMower, devilhorns
Reviewed By: ManMower
Subscribers: cedric, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6298
Summary:
memset overwrites the thread value, triggering errors when running tools like
helgrind
attempting an operation on an invalid thread will cause errors naturally,
so zeroing the rest of the struct and ignoring the thread member is fine
Reviewers: ManMower, devilhorns
Reviewed By: ManMower
Subscribers: cedric, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6297
This reverts commit 8343de6ce3.
This borke mac os build, CI is spamming on irc channels and addtional
tests are failing. I would give this back to the drawingboard.
ref T7029
Differential Revision: https://phab.enlightenment.org/D6310
Summary:
these effectively prevent locks from being used to synchronize operations
between (non-main) threads, which restricts their usefulness and also
prevents our own unit tests from passing
fix T7004
Depends on D6267
Reviewers: devilhorns, ManMower
Reviewed By: ManMower
Subscribers: cedric, #committers
Tags: #efl
Maniphest Tasks: T7004, T1984
Differential Revision: https://phab.enlightenment.org/D6285
Summary:
this lock/thread never gets destroyed, so it should not trigger failure cases
when that is always the case
@fix
Depends on D6266
Reviewers: stefan_schmidt, ManMower, devilhorns
Reviewed By: ManMower
Subscribers: cedric, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6267
Summary:
recursive locks are locked multiple times in the same thread, leading to
failure with the tracking infrastructure which was written prior to
the addition of recursive locks and assumed that locks would only be
taken exactly once
given that this debug info is meant to handle non-recursive locks,
it makes little sense to include them in the handling
@fix
Depends on D6264
Reviewers: stefan_schmidt, ManMower, devilhorns
Reviewed By: ManMower
Subscribers: cedric, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6265
Summary:
recursive writes are not inherently bad, so long as the pointer is
consistently re-set (handled automatically by macros), and they are nearly
unavoidable in some places such as eo/evas internals
issues may arise in a specific corner case of recursive writes when a pointer
has been hashed for garbage collection, so adjust the checks to watch for this
specific case instead of crashing on every case
fix T7005
Reviewers: devilhorns
Reviewed By: devilhorns
Subscribers: cedric, #committers
Tags: #efl
Maniphest Tasks: T7005
Differential Revision: https://phab.enlightenment.org/D6284
Summary:
a mutex can only have one type, so setting this type onto a recursive mutex
will unset the recursive attribute and cause deadlocks
ref T1984
@fix
Reviewers: stefan_schmidt, ManMower, devilhorns
Reviewed By: devilhorns
Subscribers: cedric, #committers
Tags: #efl
Maniphest Tasks: T1984
Differential Revision: https://phab.enlightenment.org/D6264
Summary:
eina_share_common contained extremely verbose printfs which rendered
the debug profile (./configure --with-profile=debug) almost unusable.
They have been turned into EINA_LOG_DBG in the eina_stringshare log domain
(when related to stringshares) and without domain when related to other
eina_share facilities.
Also, cleaned up some printfs which have been commented out for 8 years.
Fixes T7006
Test Plan:
The printfs are regular eina logs and can be filtered out by regular means.
The debug profile output is far more usable now.
Reviewers: zmike, devilhorns
Subscribers: cedric, #committers
Tags: #efl
Maniphest Tasks: T7006
Differential Revision: https://phab.enlightenment.org/D6288
Summary:
this is a valid return code which indicates success and is passed randomly to
one of the callers
@fix
Depends on D6267
Reviewers: stefan_schmidt, ManMower, devilhorns
Reviewed By: devilhorns
Subscribers: cedric, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6268
Summary:
Adds documentation about internals of a couple functions and cleans up
some stray doxygen tags.
Reviewers: cedric
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6039
Summary:
Adds documentation for several routines, fixes some incorrect
documentation, cleans up grammar throughout, corrects a few remaining
spelling errors.
Reviewers: cedric
Differential Revision: https://phab.enlightenment.org/D6021