diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-07-21 00:54:07 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-08-15 12:43:26 +0200 |
commit | bf051865e0927b681417c665fb2aa4b389b7c6bb (patch) | |
tree | 8b000151be8c10c1d049266e445fd3b3fd2103fc /kern/thread.c | |
parent | 74238b7db2a72ccad31264f50a1c2d3be0b05d4e (diff) |
turn all_psets_lock into a general lock
Diffstat (limited to 'kern/thread.c')
-rw-r--r-- | kern/thread.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kern/thread.c b/kern/thread.c index 865a1cc..ebc0bdd 100644 --- a/kern/thread.c +++ b/kern/thread.c @@ -2250,7 +2250,7 @@ void thread_collect_scan(void) prev_thread = THREAD_NULL; prev_pset = PROCESSOR_SET_NULL; - simple_lock(&all_psets_lock); + lock_all_psets(); queue_iterate(&all_psets, pset, processor_set_t, all_psets) { pset_lock(pset); queue_iterate(&pset->threads, thread, thread_t, pset_threads) { @@ -2269,7 +2269,7 @@ void thread_collect_scan(void) (void) splx(s); pset->ref_count++; pset_unlock(pset); - simple_unlock(&all_psets_lock); + unlock_all_psets(); pcb_collect(thread); @@ -2281,7 +2281,7 @@ void thread_collect_scan(void) pset_deallocate(prev_pset); prev_pset = pset; - simple_lock(&all_psets_lock); + lock_all_psets(); pset_lock(pset); } else { thread_unlock(thread); @@ -2290,7 +2290,7 @@ void thread_collect_scan(void) } pset_unlock(pset); } - simple_unlock(&all_psets_lock); + unlock_all_psets(); if (prev_thread != THREAD_NULL) thread_deallocate(prev_thread); |