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