Age | Commit message (Collapse) | Author | Files | Lines |
|
For historical reasons, the code was placed under gtk/ subdirectory.
If it was always bugging you, bug no more!
|
|
gnulib 'make syntax-check' prohibits use of #ifdef HAVE_CONFIG_H so this
commit removes it from where it's used. It also makes sure we always use
the same syntax for including config.h (#include "config.h" VS #include
<config.h>) as a consistent way of doing that is expected.
|
|
Use a nicer function, with correct prefix.
Remove extra "context" from function name
|
|
Take an approach similar to gthreads, which are considered as low
level/must work features by glib, which aborts on failures.
|
|
|
|
The coroutine_init function mmap's a stack for the
ucontext coroutine, but nothing ever munmaps it.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
If we fail to mmap the stack, abort the processs rather
than returning an error. This is standard practice in
glib apps, and the caller was not checking the
coroutine_init() return code leading to memory corruption.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
The IN_MAIN_CONTEXT macro checks coroutine_self()->caller against NULL to
decide whether we are in the main context or not. However, this is an
implementation detail of the ucontext coroutine implementation, in the
gthread implementation, coroutine_self()->caller will be non-NULL even in
the main context.
This commit introduces a coroutine_is_main_context() method which each
coroutine backend implements. It turns out it can be implemented the same
way for each backend.
|
|
When leaving a coroutine, it swaps back to where it came from, not to
the leader/main coroutine.
|
|
|
|
|
|
Mac OS X doesn't have MAP_ANONYMOUS, only MAP_ANON, so use MAP_ANON
when MAP_ANONYMOUS isn't defined.
|
|
|