Fix following bugs in "fallback implementation of counting semaphores with mutex+condvar" added in c166cb72f1676855816340666c3b618beef4b976: - waiting threads are not restarted properly if more than one threads are waiting unblock signals in qemu_sem_timedwait() - possible missing pthread_cond_signal(3) calls when waiting threads are returned by ETIMEDOUT - fix an uninitialized variable The problem is analyzed by and fix is provided by Noriyuki Soda. Also put additional cleanup suggested by Laszlo Ersek: - make QemuSemaphore.count unsigned (it won't be negative) - check a return value of in pthread_cond_wait() in qemu_sem_wait() Signed-off-by: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-id: 1372841894-10634-1-git-send-email-tsutsui@ceres.dti.ne.jp Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> |
||
|---|---|---|
| .. | ||
| acl.h | ||
| aes.h | ||
| atomic.h | ||
| bitmap.h | ||
| bitops.h | ||
| bswap.h | ||
| cache-utils.h | ||
| compatfd.h | ||
| compiler.h | ||
| config-file.h | ||
| crc32c.h | ||
| envlist.h | ||
| error-report.h | ||
| event_notifier.h | ||
| fifo8.h | ||
| hbitmap.h | ||
| host-utils.h | ||
| int128.h | ||
| iov.h | ||
| log.h | ||
| main-loop.h | ||
| module.h | ||
| notify.h | ||
| option.h | ||
| option_int.h | ||
| osdep.h | ||
| queue.h | ||
| range.h | ||
| ratelimit.h | ||
| sockets.h | ||
| thread-posix.h | ||
| thread-win32.h | ||
| thread.h | ||
| timer.h | ||
| tls.h | ||
| typedefs.h | ||
| uri.h | ||
| xattr.h | ||