From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59428) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUIb3-00042q-Mm for qemu-devel@nongnu.org; Mon, 22 Apr 2013 11:24:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUIb1-0008O0-QW for qemu-devel@nongnu.org; Mon, 22 Apr 2013 11:24:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21914) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUIb1-0008Nr-Ix for qemu-devel@nongnu.org; Mon, 22 Apr 2013 11:23:59 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3MFNxgH015981 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 22 Apr 2013 11:23:59 -0400 From: Alon Levy Date: Mon, 22 Apr 2013 18:04:40 +0300 Message-Id: <1366643098-2566-11-git-send-email-alevy@redhat.com> In-Reply-To: <1366643098-2566-1-git-send-email-alevy@redhat.com> References: <1366643098-2566-1-git-send-email-alevy@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v3 10/28] libcacard: vscclient to use QemuThread for portability List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: mlureau@redhat.com From: Marc-Andr=C3=A9 Lureau --- libcacard/vscclient.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/libcacard/vscclient.c b/libcacard/vscclient.c index 5e00db3..5f47634 100644 --- a/libcacard/vscclient.c +++ b/libcacard/vscclient.c @@ -218,8 +218,7 @@ on_host_init(VSCMsgHeader *mhHeader, VSCMsgInit *inco= ming) int num_capabilities =3D 1 + ((mhHeader->length - sizeof(VSCMsgInit)) / sizeof(uint32_t))= ; int i; - int rv; - pthread_t thread_id; + QemuThread thread_id; =20 incoming->version =3D ntohl(incoming->version); if (incoming->version !=3D VSCARD_VERSION) { @@ -242,11 +241,7 @@ on_host_init(VSCMsgHeader *mhHeader, VSCMsgInit *inc= oming) send_msg(VSC_ReaderRemove, VSCARD_MINIMAL_READER_ID, NULL, 0); /* launch the event_thread. This will trigger reader adds for all th= e * existing readers */ - rv =3D pthread_create(&thread_id, NULL, event_thread, NULL); - if (rv < 0) { - perror("pthread_create"); - return rv; - } + qemu_thread_create(&thread_id, event_thread, NULL, 0); return 0; } =20 --=20 1.8.2