Skip to contentSkip to conversation

Stop saving/restoring cpu_single_env

PATCH In review Jan Kiszka 2 participants 3 messages Jul 17, 2012

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 Stop saving/restoring cpu_single_env

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

---
 cpus.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
cpus.c +0 -3
index b182b3d..733568d 100644
@@ -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;
     }
 }
 
Signature · 1 line
1.7.3.4
#1 lore raw
Quoted 2 lines · Jan Kiszka

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

author
#2 lore raw
Quoted 6 lines · Peter Maydell
Quoted 2 lines · Jan Kiszka

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

Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux