[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [patch 1/7] qemu: mutex/thread/cond wrappers

From: Jamie Lokier
Subject: Re: [Qemu-devel] [patch 1/7] qemu: mutex/thread/cond wrappers
Date: Thu, 19 Mar 2009 18:49:03 +0000
User-agent: Mutt/1.5.13 (2006-08-11)

Avi Kivity wrote:
> >+int qemu_mutex_init(QemuMutex *mutex)
> >+{
> >+    return pthread_mutex_init(&mutex->lock, NULL);
> >+}
> No one will check the return code, so better to check it here and 
> abort() if it's bad.

I agree.

Same applies to pthread_mutex_lock, etc., all of which return an error
code, can fail if misused, and nobody checks.

-- Jamie

reply via email to

[Prev in Thread] Current Thread [Next in Thread]