summaryrefslogtreecommitdiff
path: root/linux-user/main.c
diff options
context:
space:
mode:
authorEvgeny Voevodin <evgenyvoevodin@gmail.com>2013-02-01 01:47:23 +0700
committerBlue Swirl <blauwirbel@gmail.com>2013-02-16 10:41:16 +0000
commit5e5f07e08f7ed8c8eb9b02d9f9c3c79cf95d65ee (patch)
treee5e495dbded2697b180c04de308701755297731b /linux-user/main.c
parent0b0d3320db74cde233ee7855ad32a9c121d20eb4 (diff)
downloadqemu-5e5f07e08f7ed8c8eb9b02d9f9c3c79cf95d65ee.tar.gz
TCG: Move translation block variables to new context inside tcg_ctx: tb_ctx
It's worth to clean-up translation blocks variables and move them into one context as was suggested by Swirl. Also if we use this context directly inside tcg_ctx, then it speeds up code generation a bit. Signed-off-by: Evgeny Voevodin <evgenyvoevodin@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'linux-user/main.c')
-rw-r--r--linux-user/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index 3df8aa2cc5..7902f3beb2 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -111,7 +111,7 @@ static int pending_cpus;
/* Make sure everything is in a consistent state for calling fork(). */
void fork_start(void)
{
- pthread_mutex_lock(&tb_lock);
+ pthread_mutex_lock(&tcg_ctx.tb_ctx.tb_lock);
pthread_mutex_lock(&exclusive_lock);
mmap_fork_start();
}
@@ -129,11 +129,11 @@ void fork_end(int child)
pthread_mutex_init(&cpu_list_mutex, NULL);
pthread_cond_init(&exclusive_cond, NULL);
pthread_cond_init(&exclusive_resume, NULL);
- pthread_mutex_init(&tb_lock, NULL);
+ pthread_mutex_init(&tcg_ctx.tb_ctx.tb_lock, NULL);
gdbserver_fork(thread_env);
} else {
pthread_mutex_unlock(&exclusive_lock);
- pthread_mutex_unlock(&tb_lock);
+ pthread_mutex_unlock(&tcg_ctx.tb_ctx.tb_lock);
}
}