Compare commits

...

3 Commits

3 changed files with 6 additions and 3 deletions

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
builddbg/
test-bin/
__pycache__/
.ccls-cache/
compile_commands.json
sysroot/bin

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.2)
cmake_minimum_required(VERSION 3.5)
# Set because our cross compiler can't do dynamic linking?
set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY")

View File

@ -120,8 +120,10 @@ void Thread::Cleanup() {
// 2. Unblock waiting threads.
while (blocked_threads_.size() != 0) {
auto thread = blocked_threads_.PopFront();
thread->SetState(Thread::RUNNABLE);
gScheduler->Enqueue(thread);
if (!thread->IsDying()) {
thread->SetState(Thread::RUNNABLE);
gScheduler->Enqueue(thread);
}
}
// 3. Release Kernel Stack