qemu-e2k/util
Paolo Bonzini ef57137f1b qemu-thread: add per-thread atexit functions
Destructors are the main additional feature of pthread TLS compared
to __thread.  If we were using C++ (hint, hint!) we could have used
thread-local objects with a destructor.  Since we are not, instead,
we add a simple Notifier-based API.

Note that the notifier must be per-thread as well.  We can add a
global list as well later, perhaps.

The Win32 implementation has some complications because a) detached
threads used not to have a QemuThreadData; b) the main thread does
not go through win32_start_routine, so we have to use atexit too.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-id: 1417518350-6167-3-git-send-email-pbonzini@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2015-01-13 13:43:29 +00:00
..
acl.c acl: fix memory leak 2014-11-17 11:48:56 +01:00
aes.c
bitmap.c
bitops.c
compatfd.c
crc32c.c
cutils.c
envlist.c
error.c
event_notifier-posix.c
event_notifier-win32.c
fifo8.c
getauxval.c
hbitmap.c util: Use g_new() & friends where that makes obvious sense 2014-12-10 11:34:15 +03:00
hexdump.c
host-utils.c
id.c
iov.c util: Use g_new() & friends where that makes obvious sense 2014-12-10 11:34:15 +03:00
Makefile.objs
module.c
notify.c
osdep.c
oslib-posix.c memory: expose alignment used for allocating RAM as MemoryRegion API 2014-11-23 12:11:30 +02:00
oslib-win32.c memory: expose alignment used for allocating RAM as MemoryRegion API 2014-11-23 12:11:30 +02:00
path.c
qemu-config.c
qemu-error.c
qemu-openpty.c
qemu-option.c block: Don't add trailing space in "Formating..." message 2014-12-12 16:52:33 +00:00
qemu-progress.c
qemu-sockets.c
qemu-thread-posix.c qemu-thread: add per-thread atexit functions 2015-01-13 13:43:29 +00:00
qemu-thread-win32.c qemu-thread: add per-thread atexit functions 2015-01-13 13:43:29 +00:00
qemu-timer-common.c
readline.c
rfifolock.c
throttle.c
unicode.c
uri.c util: Fuse g_malloc(); memset() into g_new0() 2014-12-10 11:33:38 +03:00