do_fork(): return -ENOMEM when no more TIDs available

This commit is contained in:
Balazs Gerofi
2018-01-26 13:53:05 +09:00
parent 722ae0e7d5
commit b8ee144e67

View File

@ -2450,13 +2450,14 @@ retry_tid:
}
}
mcs_rwlock_writer_unlock(&newproc->threads_lock, &lock);
/* TODO: spawn more mcexec threads */
if (!new->tid) {
release_cpuid(cpuid);
kprintf("%s: no more TIDs available\n");
panic("");
return -ENOMEM;
}
mcs_rwlock_writer_unlock(&newproc->threads_lock, &lock);
}
/* fork() a new process on the host */
else {