1. 01 9月, 2011 6 次提交
  2. 22 8月, 2011 2 次提交
  3. 21 8月, 2011 2 次提交
  4. 09 8月, 2011 4 次提交
  5. 08 8月, 2011 1 次提交
  6. 04 8月, 2011 2 次提交
    • G
      usb-hid: split hid code to hw/hid.[ch] · dcfda673
      Gerd Hoffmann 提交于
      Almost pure code motion.  Unstatic hid interface functions and add
      them to the header file.  Some renames.  Some code style cleanups.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      dcfda673
    • G
      usb: use iovecs in USBPacket · 4f4321c1
      Gerd Hoffmann 提交于
      Zap data pointer from USBPacket, add a QEMUIOVector instead.
      Add a bunch of helper functions to manage USBPacket data.
      Switch over users to the new interface.
      
      Note that USBPacket->len was used for two purposes:  First to
      pass in the buffer size and second to return the number of
      transfered bytes or the status code on async transfers.  There
      is a new result variable for the latter.  A new status code
      was added to catch uninitialized result.
      
      Nobody creates iovecs with more than one element (yet).
      Some users are (temporarely) limited to iovecs with a single
      element to keep the patch size as small as possible.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      4f4321c1
  7. 03 8月, 2011 1 次提交
  8. 02 8月, 2011 2 次提交
  9. 01 8月, 2011 2 次提交
    • A
      coroutine: implement coroutines using gthread · d0e2fce5
      Aneesh Kumar K.V 提交于
      On platforms that don't support makecontext(3) use gthread based
      coroutine implementation.
      
      Darwin has makecontext(3) but getcontext(3) is stubbed out to return
      ENOTSUP.  Andreas Färber <andreas.faerber@web.de> debugged this and
      contributed the ./configure test which solves the issue for Darwin/ppc64
      (and ppc) v10.5.
      
      [Original patch by Aneesh, made consistent with coroutine-ucontext.c and
      switched to GStaticPrivate by Stefan.  Tested on Linux and OpenBSD.]
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      d0e2fce5
    • K
      coroutine: introduce coroutines · 00dccaf1
      Kevin Wolf 提交于
      Asynchronous code is becoming very complex.  At the same time
      synchronous code is growing because it is convenient to write.
      Sometimes duplicate code paths are even added, one synchronous and the
      other asynchronous.  This patch introduces coroutines which allow code
      that looks synchronous but is asynchronous under the covers.
      
      A coroutine has its own stack and is therefore able to preserve state
      across blocking operations, which traditionally require callback
      functions and manual marshalling of parameters.
      
      Creating and starting a coroutine is easy:
      
        coroutine = qemu_coroutine_create(my_coroutine);
        qemu_coroutine_enter(coroutine, my_data);
      
      The coroutine then executes until it returns or yields:
      
        void coroutine_fn my_coroutine(void *opaque) {
            MyData *my_data = opaque;
      
            /* do some work */
      
            qemu_coroutine_yield();
      
            /* do some more work */
        }
      
      Yielding switches control back to the caller of qemu_coroutine_enter().
      This is typically used to switch back to the main thread's event loop
      after issuing an asynchronous I/O request.  The request callback will
      then invoke qemu_coroutine_enter() once more to switch back to the
      coroutine.
      
      Note that if coroutines are used only from threads which hold the global
      mutex they will never execute concurrently.  This makes programming with
      coroutines easier than with threads.  Race conditions cannot occur since
      only one coroutine may be active at any time.  Other coroutines can only
      run across yield.
      
      This coroutines implementation is based on the gtk-vnc implementation
      written by Anthony Liguori <anthony@codemonkey.ws> but it has been
      significantly rewritten by Kevin Wolf <kwolf@redhat.com> to use
      setjmp()/longjmp() instead of the more expensive swapcontext() and by
      Paolo Bonzini <pbonzini@redhat.com> for Windows Fibers support.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      00dccaf1
  10. 22 7月, 2011 8 次提交
  11. 21 7月, 2011 1 次提交
  12. 17 7月, 2011 1 次提交
  13. 14 6月, 2011 2 次提交
    • A
      libcacard: add libcacard.la target · 44dc0ca3
      Alon Levy 提交于
      No flag to configure is required. Instead, added a libcacard.la target that
      is not built by default, only when requested explicitly via:
      
      mkdir build
      cd build
      ../configure
      make libcacard.la
      make install-libcacard
      
      Uses libtool to do actual linking of object files and shared library, and
      installing. Tested only under linux, but supposed to work on other systems as
      well.
      
      If libtool isn't found you get a message complaining about that, only at build
      time (since it is not a default target I did not add a message at configure
      time).
      
      New build artifacts:
       .libs subdirectories (at <buildroot> and <buildroot>/libcacard)
       *.lo files (at same locations as the respective o files)
      
      Added %.lo : %.c rule that uses libtool.
      Updated clean rule to clean up those artifacts.
      Added specific rule to call dtrace with libtool wrapper (note that because of
      a current upstream dtrace bug fixed by systemtap b1568fd85 commit the -fPIC flag
      isn't actually passed on. still current dtrace+libtool produced object links fine).
      If libtool is missing any of the following targets will complain and exit 1:
       any subdir: *.lo
       root and libcacard: libcacard.la, libcacard-instsall
      
      Tested to link and load with all tracing backends.
      44dc0ca3
    • A
      cocoa: Revert dependency on VNC · e949467b
      Andreas Färber 提交于
      In 821601ea (Make VNC support optional)
      cocoa.o was moved from ui-obj-$(CONFIG_COCOA) to vnc-obj-$(CONFIG_COCOA),
      adding a dependency on $(CONFIG_VNC). That must've been unintentional.
      
      Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
      Cc: Anthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NAndreas Färber <andreas.faerber@web.de>
      e949467b
  14. 08 6月, 2011 3 次提交
  15. 02 6月, 2011 3 次提交