From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:58609) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R63ZO-0007xb-Tz for qemu-devel@nongnu.org; Tue, 20 Sep 2011 12:53:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R63ZN-0000x5-IE for qemu-devel@nongnu.org; Tue, 20 Sep 2011 12:53:18 -0400 Received: from thoth.sbs.de ([192.35.17.2]:17248) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R63ZN-0000wr-85 for qemu-devel@nongnu.org; Tue, 20 Sep 2011 12:53:17 -0400 From: Jan Kiszka Date: Tue, 20 Sep 2011 18:53:07 +0200 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 0/6] Spread the use of QEMU threading & locking API List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori , qemu-devel@nongnu.org Cc: Kevin Wolf , Paolo Bonzini , =?UTF-8?q?Andreas=20F=C3=A4rber?= This adds two missing features to our QEMU threading and locking abstractions, qemu_thread_join and qemu_cond_timedwait, and then converts compat AIO, compatfd, and several audio subsystems. This not only saves a few lines of code, it also allows to apply certain thread and lock parameters centrally which is specifically important when using SCHED_FIFO. Note that patch 6 is untested. Am I right that the other threads coreaudioVoiceOut::mutex addresses are created by the coreaudio core? Just curious. Furthermore note that the changes to posix-aio-compat.c depend on patches in Kevin's latest pull request. CC: Andreas F=C3=A4rber CC: Kevin Wolf CC: malc Jan Kiszka (6): Enable joinable POSIX threads Introduce qemu_cond_timedwait Switch POSIX compat AIO to QEMU abstractions Switch compatfd to QEMU thread audio: Use QEMU threads & synchronization audio: Switch coreaudio to QemuMutex audio/audio_pt_int.c | 167 ++---------------------------------------= ------ audio/audio_pt_int.h | 45 +++++++++---- audio/coreaudio.c | 56 ++-------------- audio/esdaudio.c | 92 +++++++------------------- audio/paaudio.c | 84 +++++++---------------- compatfd.c | 16 +---- cpus.c | 6 +- hw/ccid-card-emulated.c | 5 +- posix-aio-compat.c | 115 +++++++++----------------------- qemu-thread-posix.c | 53 ++++++++++++++- qemu-thread-posix.h | 3 + qemu-thread-win32.c | 20 +++++- qemu-thread.h | 9 ++- ui/vnc-jobs-async.c | 2 +- 14 files changed, 219 insertions(+), 454 deletions(-) --=20 1.7.3.4