qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Stefan Weil <sw@weilnetz.de>
Cc: qemu-devel@nongnu.org, anthony@codemonkey.ws
Subject: Re: [Qemu-devel] [PATCH for-1.2 1/4] qemu-thread: Let qemu_thread_is_self() return bool
Date: Thu, 02 Aug 2012 18:14:14 +0200	[thread overview]
Message-ID: <501AA756.1030201@suse.de> (raw)
In-Reply-To: <501A1DD0.5000806@weilnetz.de>

Am 02.08.2012 08:27, schrieb Stefan Weil:
> Am 02.08.2012 02:48, schrieb Andreas Färber:
>> qemu_cpu_is_self(), passing the return value through, will later be
>> adapted to return bool as well.
>>
>> Signed-off-by: Andreas Färber <afaerber@suse.de>
>> ---
>>   qemu-thread-posix.c |    2 +-
>>   qemu-thread-win32.c |    2 +-
>>   qemu-thread.h       |    3 ++-
>>   3 files changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/qemu-thread-posix.c b/qemu-thread-posix.c
>> index 9e1b5fb..8fbabda 100644
>> --- a/qemu-thread-posix.c
>> +++ b/qemu-thread-posix.c
>> @@ -151,7 +151,7 @@ void qemu_thread_get_self(QemuThread *thread)
>>       thread->thread = pthread_self();
>>   }
>>   -int qemu_thread_is_self(QemuThread *thread)
>> +bool qemu_thread_is_self(QemuThread *thread)
>>   {
>>      return pthread_equal(pthread_self(), thread->thread);
>>   }
>> diff --git a/qemu-thread-win32.c b/qemu-thread-win32.c
>> index 3524c8b..177b398 100644
>> --- a/qemu-thread-win32.c
>> +++ b/qemu-thread-win32.c
>> @@ -330,7 +330,7 @@ HANDLE qemu_thread_get_handle(QemuThread *thread)
>>       return handle;
>>   }
>>   -int qemu_thread_is_self(QemuThread *thread)
>> +bool qemu_thread_is_self(QemuThread *thread)
>>   {
>>       return GetCurrentThreadId() == thread->tid;
>>   }
>> diff --git a/qemu-thread.h b/qemu-thread.h
>> index a78a8f2..05fdaaf 100644
>> --- a/qemu-thread.h
>> +++ b/qemu-thread.h
>> @@ -2,6 +2,7 @@
>>   #define __QEMU_THREAD_H 1
>>     #include <inttypes.h>
>> +#include <stdbool.h>
>>     typedef struct QemuMutex QemuMutex;
>>   typedef struct QemuCond QemuCond;
>> @@ -42,7 +43,7 @@ void qemu_thread_create(QemuThread *thread,
>>                           void *arg, int mode);
>>   void *qemu_thread_join(QemuThread *thread);
>>   void qemu_thread_get_self(QemuThread *thread);
>> -int qemu_thread_is_self(QemuThread *thread);
>> +bool qemu_thread_is_self(QemuThread *thread);
>>   void qemu_thread_exit(void *retval);
>>     #endif
> 
> Reviewed-by: Stefan Weil <sw@weilnetz.de>

Thanks, branch updated.

/-F

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  reply	other threads:[~2012-08-02 16:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-02  0:48 [Qemu-devel] [PULL for-1.2] QOM CPUState, part 4: initial field movements Andreas Färber
2012-08-02  0:48 ` [Qemu-devel] [PATCH for-1.2 1/4] qemu-thread: Let qemu_thread_is_self() return bool Andreas Färber
2012-08-02  6:27   ` Stefan Weil
2012-08-02 16:14     ` Andreas Färber [this message]
2012-08-02  0:48 ` [Qemu-devel] [PATCH for-1.2 2/4] cpu: Move CPU_COMMON_THREAD into CPUState Andreas Färber
2012-08-02  0:48 ` [Qemu-devel] [PATCH for-1.2 3/4] cpu: Move thread field " Andreas Färber
2012-08-02  0:48 ` [Qemu-devel] [PATCH for-1.2 4/4] cpu: Move thread_kicked to CPUState Andreas Färber
2012-08-03 20:44 ` [Qemu-devel] [PULL for-1.2] QOM CPUState, part 4: initial field movements Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=501AA756.1030201@suse.de \
    --to=afaerber@suse.de \
    --cc=anthony@codemonkey.ws \
    --cc=qemu-devel@nongnu.org \
    --cc=sw@weilnetz.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).