!proc: add schedGet and schedSet syscalls#806
Conversation
TASK: RTOS-1364
TASK: RTOS-1364
TASK: RTOS-1364
There was a problem hiding this comment.
Code Review
This pull request introduces the schedGet and schedSet system calls, refactors proc_threadPriority to support targeting arbitrary threads, and updates syscalls_schedInfo to allow querying other processes. However, several critical issues were identified in the review: a potential kernel crash due to a NULL pointer dereference in syscalls_schedGet when a thread is not found; ready queue corruption in proc_threadPriority when modifying the priority of a non-running READY thread; a potential kernel panic in proc_schedGet caused by writing to a user-space pointer while holding a spinlock; and logical errors in both syscalls_schedGet and syscalls_schedSet where the calling thread is incorrectly targeted instead of the foreign process's main thread when tid is zero.
TASK: RTOS-1364
57db788 to
64ae66f
Compare
TASK: RTOS-1364
64ae66f to
cbb5a53
Compare
|
reverting to draft for now - will need to rethink the pid/tid relationship in the kernel for the libphoenix changes first. |
TASK: RTOS-1364
Description
Motivation and Context
Types of changes
How Has This Been Tested?
Checklist:
Special treatment