Skip to content

Commit

Permalink
syscalls: disable IRQs when manipulating scheduler state
Browse files Browse the repository at this point in the history
  • Loading branch information
jewelcodes committed Jan 16, 2025
1 parent 094eb34 commit 0275b61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/syscalls/queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ static SyscallRequest *requests = NULL; // sort of a linked list in a sense
*/

void syscallHandle(void *ctx) {
setLocalSched(false);
Thread *t = getThread(getTid());
if(t) {
platformSaveContext(t->context, ctx);
Expand All @@ -31,7 +32,6 @@ void syscallHandle(void *ctx) {
if((req->function >= SYSCALL_IPC_START && req->function <= SYSCALL_IPC_END) ||
(req->function >= SYSCALL_RW_START && req->function <= SYSCALL_RW_END) ||
(req->function == SYSCALL_LSEEK)) {
setLocalSched(false);
syscallDispatchTable[req->function](req);

if(req->unblock) {
Expand Down

0 comments on commit 0275b61

Please sign in to comment.