qemu-e2k/include/qemu
Jeff Cody 6133b39f3c coroutine: abort if we try to schedule or enter a pending coroutine
The previous patch fixed a race condition, in which there were
coroutines being executing doubly, or after coroutine deletion.

We can detect common scenarios when this happens, and print an error
message and abort before we corrupt memory / data, or segfault.

This patch will abort if an attempt to enter a coroutine is made while
it is currently pending execution, either in a specific AioContext bh,
or pending execution via a timer.  It will also abort if a coroutine
is scheduled, before a prior scheduled run has occurred.

We cannot rely on the existing co->caller check for recursive re-entry
to catch this, as the coroutine may run and exit with
COROUTINE_TERMINATE before the scheduled coroutine executes.

(This is the scenario that was occurring and fixed in the previous
patch).

This patch also re-orders the Coroutine struct elements in an attempt to
optimize caching.

Signed-off-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
2017-11-21 11:58:07 -05:00
..
acl.h
atomic.h memory: avoid "resurrection" of dead FlatViews 2017-09-21 23:19:37 +02:00
base64.h
bcd.h
bitmap.h bitmap: provide to_le/from_le helpers 2017-09-22 14:11:25 +02:00
bitops.h vnc: replace hweight_long() with ctpopl() 2017-05-12 12:36:02 +02:00
bswap.h
buffer.h
compiler.h use _Static_assert in QEMU_BUILD_BUG_ON 2017-05-05 12:09:59 +02:00
config-file.h
coroutine_int.h coroutine: abort if we try to schedule or enter a pending coroutine 2017-11-21 11:58:07 -05:00
coroutine.h coroutine-lock: add qemu_co_rwlock_downgrade and qemu_co_rwlock_upgrade 2017-07-17 11:28:15 +08:00
cpuid.h util: Introduce include/qemu/cpuid.h 2017-07-24 12:42:55 +01:00
crc32c.h
cutils.h
envlist.h
error-report.h error: Functions to report warnings and informational messages 2017-07-13 13:49:54 +02:00
event_notifier.h
fifo8.h
fifo32.h
fprintf-fn.h
futex.h futex: add missing header guards 2017-10-16 20:57:13 +03:00
hbitmap.h hbitmap: Rename serialization_granularity to serialization_align 2017-10-06 16:28:58 +02:00
help_option.h
host-utils.h host-utils: Simplify pow2ceil() 2017-09-06 14:38:03 +01:00
id.h
int128.h
iov.h tests: Use real size for iov tests 2017-09-05 22:34:40 +02:00
jhash.h
log.h
main-loop.h main_loop: Make main_loop_wait() return void 2017-07-04 14:39:28 +02:00
memfd.h
mmap-alloc.h
module.h
notify.h
option_int.h
option.h
osdep.h osdep: introduce qemu_mprotect_rwx/none 2017-10-24 13:53:42 -07:00
path.h
processor.h
qdist.h
qht.h
queue.h
range.h
ratelimit.h blockjob: Track job ratelimits via bytes, not sectors 2017-07-10 13:18:06 +02:00
rcu_queue.h
rcu.h Revert "rcu: do not create thread in pthread_atfork callback" 2017-08-08 10:40:19 +02:00
readline.h
seqlock.h
sockets.h net/net: Convert parse_host_port() to Error 2017-09-08 08:17:37 +08:00
stats64.h util: add stats64 module 2017-06-16 07:55:00 +08:00
systemd.h
thread-posix.h thread-posix: fix qemu_rec_mutex_trylock macro 2017-11-14 14:31:33 +01:00
thread-win32.h qemu-thread: Assert locks are initialized before using 2017-07-04 14:39:28 +02:00
thread.h
throttle-options.h block: add throttle block filter driver 2017-09-06 10:12:02 +02:00
throttle.h block: convert ThrottleGroup to object with QOM 2017-09-05 18:12:21 +02:00
timed-average.h
timer.h timer.h: Provide better monotonic time 2017-06-13 14:56:59 +01:00
typedefs.h console: add support for dmabufs 2017-10-17 10:25:42 +02:00
unicode.h
uri.h
uuid.h
xattr.h