All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Stop saving/restoring cpu_single_env
@ 2012-07-17 15:23 Jan Kiszka
  2012-07-17 15:27 ` Peter Maydell
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2012-07-17 15:23 UTC (permalink / raw)
  To: qemu-trivial; +Cc: qemu-devel

This variable is now thread-local, so cannot change anymore while
dropping the global mutex.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 cpus.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/cpus.c b/cpus.c
index b182b3d..733568d 100644
--- a/cpus.c
+++ b/cpus.c
@@ -660,10 +660,7 @@ void run_on_cpu(CPUArchState *env, void (*func)(void *data), void *data)
 
     qemu_cpu_kick(env);
     while (!wi.done) {
-        CPUArchState *self_env = cpu_single_env;
-
         qemu_cond_wait(&qemu_work_cond, &qemu_global_mutex);
-        cpu_single_env = self_env;
     }
 }
 
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] Stop saving/restoring cpu_single_env
  2012-07-17 15:23 [Qemu-devel] [PATCH] Stop saving/restoring cpu_single_env Jan Kiszka
@ 2012-07-17 15:27 ` Peter Maydell
  2012-07-17 15:31   ` Jan Kiszka
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Maydell @ 2012-07-17 15:27 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: qemu-trivial, qemu-devel

On 17 July 2012 16:23, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> This variable is now thread-local, so cannot change anymore while
> dropping the global mutex.

This isn't true on any host except Linux, and run_on_cpu() isn't
inside a !_WIN32 ifdef as far as I can tell.

-- PMM

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] Stop saving/restoring cpu_single_env
  2012-07-17 15:27 ` Peter Maydell
@ 2012-07-17 15:31   ` Jan Kiszka
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Kiszka @ 2012-07-17 15:31 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-trivial, qemu-devel

On 2012-07-17 17:27, Peter Maydell wrote:
> On 17 July 2012 16:23, Jan Kiszka <jan.kiszka@siemens.com> wrote:
>> This variable is now thread-local, so cannot change anymore while
>> dropping the global mutex.
> 
> This isn't true on any host except Linux, and run_on_cpu() isn't
> inside a !_WIN32 ifdef as far as I can tell.

Err, yes, forgot that minor detail. It would also break on non-Linux Unixes.

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-07-17 15:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-17 15:23 [Qemu-devel] [PATCH] Stop saving/restoring cpu_single_env Jan Kiszka
2012-07-17 15:27 ` Peter Maydell
2012-07-17 15:31   ` Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.