mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:27:45 +00:00
Add a few more InterruptDisablers.
This commit is contained in:
parent
1c49b34b93
commit
ce126120d1
1 changed files with 6 additions and 1 deletions
|
@ -102,6 +102,7 @@ void Task::allocateLDT()
|
||||||
|
|
||||||
Vector<Task*> Task::allTasks()
|
Vector<Task*> Task::allTasks()
|
||||||
{
|
{
|
||||||
|
InterruptDisabler disabler;
|
||||||
Vector<Task*> tasks;
|
Vector<Task*> tasks;
|
||||||
tasks.ensureCapacity(s_tasks->sizeSlow());
|
tasks.ensureCapacity(s_tasks->sizeSlow());
|
||||||
for (auto* task = s_tasks->head(); task; task = task->next())
|
for (auto* task = s_tasks->head(); task; task = task->next())
|
||||||
|
@ -441,7 +442,8 @@ void Task::sys$exit(int status)
|
||||||
|
|
||||||
void Task::taskDidCrash(Task* crashedTask)
|
void Task::taskDidCrash(Task* crashedTask)
|
||||||
{
|
{
|
||||||
// NOTE: This is called from an excepton handler, so interrupts are disabled.
|
ASSERT_INTERRUPTS_DISABLED();
|
||||||
|
|
||||||
crashedTask->setState(Crashing);
|
crashedTask->setState(Crashing);
|
||||||
crashedTask->dumpRegions();
|
crashedTask->dumpRegions();
|
||||||
|
|
||||||
|
@ -499,6 +501,8 @@ void switchNow()
|
||||||
|
|
||||||
bool scheduleNewTask()
|
bool scheduleNewTask()
|
||||||
{
|
{
|
||||||
|
ASSERT_INTERRUPTS_DISABLED();
|
||||||
|
|
||||||
if (!current) {
|
if (!current) {
|
||||||
// XXX: The first ever context_switch() goes to the idle task.
|
// XXX: The first ever context_switch() goes to the idle task.
|
||||||
// This to setup a reliable place we can return to.
|
// This to setup a reliable place we can return to.
|
||||||
|
@ -801,6 +805,7 @@ pid_t Task::sys$getpid()
|
||||||
|
|
||||||
pid_t Task::sys$waitpid(pid_t waitee)
|
pid_t Task::sys$waitpid(pid_t waitee)
|
||||||
{
|
{
|
||||||
|
InterruptDisabler disabler;
|
||||||
if (!Task::fromPID(waitee))
|
if (!Task::fromPID(waitee))
|
||||||
return -1;
|
return -1;
|
||||||
m_waitee = waitee;
|
m_waitee = waitee;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue