Skip to content
Snippets Groups Projects
  1. Jan 01, 2014
    • Avi Kivity's avatar
      condvar: rename members to conform to coding style · 7460be08
      Avi Kivity authored
      
      the _ prefix helps to distinguish between members and non-members; helps with
      the next patch.
      
      Signed-off-by: default avatarAvi Kivity <avi@cloudius-systems.com>
      7460be08
    • Avi Kivity's avatar
      condvar: make WAIT_MORPHING required · 8b224474
      Avi Kivity authored
      
      Make the code more maintainable by removing the #ifdefs; it doesn't make
      sense to disable wait morphing.
      
      Signed-off-by: default avatarAvi Kivity <avi@cloudius-systems.com>
      8b224474
    • Avi Kivity's avatar
      net: call socket constructor and destructor · b42fd865
      Avi Kivity authored
      
      Drop the socket uma zone and replace it with calls to new and delete.  This
      allows the constructor and destructor to be called, so we can add C++
      objects to the socket structure.
      
      Take care to use the default-initializing form of the constructor since
      the socket code requires zero initialization.
      
      We lose the ability to limit the socket count, so we'll have to re-add it in
      the future if we want it.
      
      Signed-off-by: default avatarAvi Kivity <avi@cloudius-systems.com>
      b42fd865
    • Nadav Har'El's avatar
      file: reduce boiler-plate code in special files · 9478a14d
      Nadav Har'El authored
      
      Each implementation of "struct file" needs to implement 8 different file
      operations. Most special file implementations, such as pipe, socketpair,
      epoll and timerfd, don't support many of these operations. We had in
      unsupported.h functions that can be reused for the unsupported operation,
      but this resulted in a lot of ugly boiler-plate code.
      
      Instead, this patch switches to a cleaner, more C++-like, method:
      It defines a new "file" subclass, called "special_file", which implements
      all file operations except close(), with a default implementation identical
      to the old unsupported.h implementations.
      
      The files of pipe(), socketpair(), timerfd() and epoll_create() now inherit
      from special_file, and only override the file operations they really want
      to implement.
      
      Signed-off-by: default avatarNadav Har'El <nyh@cloudius-systems.com>
      Signed-off-by: default avatarAvi Kivity <avi@cloudius-systems.com>
      9478a14d
  2. Dec 31, 2013
  3. Dec 30, 2013
  4. Dec 27, 2013
Loading