20 lines
400 B
C
20 lines
400 B
C
#include <stdint.h>
|
|
#include "syscall.h"
|
|
#include "sched.h"
|
|
#include "proc/proc.h"
|
|
#include "spinlock/spinlock.h"
|
|
#include "errors.h"
|
|
#include "hal/hal.h"
|
|
|
|
int32_t SYSCALL0(sys_schedrelease) {
|
|
spinlock_acquire(&PROCS.spinlock);
|
|
Proc *proc = PROCS.current;
|
|
spinlock_release(&PROCS.spinlock);
|
|
|
|
if (INTR_CURRENT_FRAME != NULL) {
|
|
proc_sched((void *)INTR_CURRENT_FRAME);
|
|
}
|
|
|
|
return E_OK;
|
|
}
|