diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-07-25 02:15:31 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-08-15 12:43:26 +0200 |
commit | c14ec479e087cf73da7496eddf6d39c85bbf0e5c (patch) | |
tree | 7fc58d454b6f91638a35c96acd3e19e3666da5b4 /kern | |
parent | c73b49b93e583d6fe9fdbfe18c540e0e3eaa6bd1 (diff) |
kern/bootstrap: tune locking
* kern/bootstrap.c (boot_script_exec_cmd): Avoid holding the lock
across the call to `thread_create'.
Diffstat (limited to 'kern')
-rw-r--r-- | kern/bootstrap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kern/bootstrap.c b/kern/bootstrap.c index 6ec110b..0f13e33 100644 --- a/kern/bootstrap.c +++ b/kern/bootstrap.c @@ -719,10 +719,10 @@ boot_script_exec_cmd (void *hook, task_t task, char *path, int argc, thread_t thread; struct user_bootstrap_info info = { mod, argv, 0, }; simple_lock_init (&info.lock); - simple_lock (&info.lock); err = thread_create ((task_t)task, &thread); assert(err == 0); + simple_lock (&info.lock); thread->saved.other = &info; thread_start (thread, user_bootstrap); err = thread_resume (thread); |