Merge branch 'stable-0.11' of git://git.sv.gnu.org/qemu into stable-0.11
authorAvi Kivity <avi@redhat.com>
Wed, 23 Sep 2009 07:29:56 +0000 (23 10:29 +0300)
committerAvi Kivity <avi@redhat.com>
Wed, 23 Sep 2009 07:30:02 +0000 (23 10:30 +0300)
* 'stable-0.11' of git://git.sv.gnu.org/qemu:
  Update version and changelog for 0.11.0 release
  RTC polling mode broken
  qcow2: Order concurrent AIO requests on the same unallocated cluster
  qemu-io: Improve portability (win32 now supported).
  target-alpha: fix extlh instruction
  tcg: fix size of local variables in tcg_gen_bswap64_i64
  net: Fix send queue ordering
  escc: fix IRQ routing, broken by 6c319c82223a1766c5d64a20051e5c6ab7b53951
  Fix Linux task preemption on Versatile board
  curses: save 250MB of memory

Signed-off-by: Avi Kivity <avi@redhat.com>
1  2 
configure
net.c
net.h

diff --cc configure
Simple merge
diff --cc net.c
--- 1/net.c
--- 2/net.c
+++ b/net.c
@@@ -486,18 -477,16 +482,17 @@@ void qemu_purge_queued_packets(VLANClie
  
  void qemu_flush_queued_packets(VLANClientState *vc)
  {
-     VLANPacket *packet;
-     while ((packet = vc->vlan->send_queue) != NULL) {
+     while (!TAILQ_EMPTY(&vc->vlan->send_queue)) {
+         VLANPacket *packet;
          int ret;
  
-         vc->vlan->send_queue = packet->next;
+         packet = TAILQ_FIRST(&vc->vlan->send_queue);
+         TAILQ_REMOVE(&vc->vlan->send_queue, packet, entry);
  
 -        ret = qemu_deliver_packet(packet->sender, packet->data, packet->size);
 +        ret = qemu_deliver_packet(packet->sender, packet->data,
 +                                  packet->size, packet->raw);
          if (ret == 0 && packet->sent_cb != NULL) {
-             packet->next = vc->vlan->send_queue;
-             vc->vlan->send_queue = packet;
+             TAILQ_INSERT_HEAD(&vc->vlan->send_queue, packet, entry);
              break;
          }
  
@@@ -515,18 -504,17 +510,18 @@@ static void qemu_enqueue_packet(VLANCli
      VLANPacket *packet;
  
      packet = qemu_malloc(sizeof(VLANPacket) + size);
-     packet->next = sender->vlan->send_queue;
      packet->sender = sender;
      packet->size = size;
 +    packet->raw = raw;
      packet->sent_cb = sent_cb;
      memcpy(packet->data, buf, size);
-     sender->vlan->send_queue = packet;
+     TAILQ_INSERT_TAIL(&sender->vlan->send_queue, packet, entry);
  }
  
 -ssize_t qemu_send_packet_async(VLANClientState *sender,
 -                               const uint8_t *buf, int size,
 -                               NetPacketSent *sent_cb)
 +static ssize_t qemu_send_packet_async2(VLANClientState *sender,
 +                                       const uint8_t *buf, int size, int raw,
 +                                       NetPacketSent *sent_cb)
  {
      int ret;
  
diff --cc net.h
--- 1/net.h
--- 2/net.h
+++ b/net.h
@@@ -38,10 -36,9 +39,10 @@@ typedef struct VLANPacket VLANPacket
  typedef void (NetPacketSent) (VLANClientState *, ssize_t);
  
  struct VLANPacket {
-     struct VLANPacket *next;
+     TAILQ_ENTRY(VLANPacket) entry;
      VLANClientState *sender;
      int size;
 +    int raw;
      NetPacketSent *sent_cb;
      uint8_t data[0];
  };