1. 10 3月, 2014 2 次提交
  2. 17 10月, 2013 1 次提交
    • P
      qemu-thread: add QemuEvent · c7c4d063
      Paolo Bonzini 提交于
      This emulates Win32 manual-reset events using futexes or conditional
      variables.  Typical ways to use them are with multi-producer,
      single-consumer data structures, to test for a complex condition whose
      elements come from different threads:
      
          for (;;) {
              qemu_event_reset(ev);
              ... test complex condition ...
              if (condition is true) {
                  break;
              }
              qemu_event_wait(ev);
          }
      
      Or more efficiently (but with some duplication):
      
          ... evaluate condition ...
          while (!condition) {
              qemu_event_reset(ev);
              ... evaluate condition ...
              if (!condition) {
                  qemu_event_wait(ev);
                  ... evaluate condition ...
              }
          }
      
      QemuEvent provides a very fast userspace path in the common case when
      no other thread is waiting, or the event is not changing state.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      c7c4d063
  3. 06 8月, 2013 1 次提交
    • I
      semaphore: fix a hangup problem under load on NetBSD hosts. · 79761c66
      Izumi Tsutsui 提交于
      Fix following bugs in "fallback implementation of counting semaphores
      with mutex+condvar" added in c166cb72:
       - 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: NIzumi Tsutsui <tsutsui@ceres.dti.ne.jp>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Message-id: 1372841894-10634-1-git-send-email-tsutsui@ceres.dti.ne.jp
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      79761c66
  4. 13 1月, 2013 1 次提交
  5. 29 12月, 2012 2 次提交
  6. 19 12月, 2012 1 次提交
  7. 03 11月, 2012 1 次提交
  8. 31 10月, 2012 1 次提交
  9. 03 8月, 2012 1 次提交
  10. 13 12月, 2011 2 次提交
  11. 21 9月, 2011 1 次提交
  12. 19 3月, 2011 1 次提交
  13. 13 3月, 2011 4 次提交
  14. 27 7月, 2010 1 次提交
  15. 15 6月, 2010 1 次提交
  16. 22 7月, 2009 1 次提交
  17. 25 4月, 2009 1 次提交