removed pdclib, strange things were happening..., user shell kinda works now
This commit is contained in:
@@ -149,10 +149,16 @@ int create_task(uint32_t entry_point, uint32_t cr3, int user, uint32_t u_esp) {
|
||||
}
|
||||
|
||||
process_t* current_task() {
|
||||
lock_scheduler();
|
||||
process_t* rtn = &process_table[current_process];
|
||||
unlock_scheduler();
|
||||
return rtn;
|
||||
}
|
||||
|
||||
process_t* current_task_unsafe() {
|
||||
return &process_table[current_process];
|
||||
}
|
||||
|
||||
void sleep(uint32_t ms) {
|
||||
if (ms == 0) return;
|
||||
lock_scheduler();
|
||||
@@ -169,3 +175,10 @@ void exit() {
|
||||
unlock_scheduler();
|
||||
}
|
||||
|
||||
void wake(process_t* task) {
|
||||
lock_scheduler();
|
||||
if (task->state == STATE_SLEEPING || task->state == STATE_BLOCKED) {
|
||||
task->state = STATE_READY;
|
||||
}
|
||||
unlock_scheduler();
|
||||
}
|
||||
Reference in New Issue
Block a user