]> git.proxmox.com Git - mirror_qemu.git/commit
linux-user: Fix conversion of sigevent argument to timer_create
authorPeter Maydell <peter.maydell@linaro.org>
Sat, 9 Aug 2014 14:42:32 +0000 (15:42 +0100)
committerRiku Voipio <riku.voipio@linaro.org>
Fri, 22 Aug 2014 12:06:33 +0000 (15:06 +0300)
commitc065976f2bca9b87bc699c5fdeb4d3ff1299b8c4
tree0abb0e875f975ca32836a16f6f718c72c6af731c
parent47575997be9e0cae44a4fcaecbd172fec3746c96
linux-user: Fix conversion of sigevent argument to timer_create

There were a number of bugs in the conversion of the sigevent
argument to timer_create from target to host format:
 * signal number not converted from target to host
 * thread ID not copied across
 * sigev_value not copied across
 * we never unlocked the struct when we were done

Between them, these problems meant that SIGEV_THREAD_ID
timers (and the glibc-implemented SIGEV_THREAD timers which
depend on them) didn't work.

Fix these problems and clean up the code a little by pulling
the struct conversion out into its own function, in line with
how we convert various other structs. This allows the test
program in bug LP:1042388 to run.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
linux-user/syscall.c