title: Creating threads and sockets from within QEMU
body: <p>I noticed that in QEMU 1.0.1 there were API functions like <code>qemu_thread_create()</code>, <code>qemu_mutex_init()</code> from <code>qemu-thread.h</code>etc as well as objects like <code>QemuTcpServerSocket</code> from <code>qemu_socket.h</code>.</p>
  
  <p>What is the purpose of these API functions? Do you have to use them to avoid problems or are they just abstractions from the operating system?</p>
  
  <p>In the recent QEMU versions, the QEMU socket and thread API functions seem to have changed.
  For QEMU 2.0 and higher, is it necessary to use the QEMU functions for thread and socket creation? Where can I find them?</p>
  
  <p><strong>My goal:</strong>
  I would like to write a dynamic library that is linked to the QEMU code. This library should be able to spwan a thread which opens a listening socket.</p>