ThreadScheduler.inc

This file defines constants and macros for the thread scheduler task of PwnOS.

See Also

Authors

  • Neil G.  Dickson
Summary
ThreadScheduler.incThis file defines constants and macros for the thread scheduler task of PwnOS.
Macros
GET_THREAD_SCHEDULER_ACCESSAcquire access to the thread scheduler task.
RELEASE_THREAD_SCHEDULER_ACCESSRelease access to the thread scheduler task so that another processor can access it.
JMP_THREAD_SCHEDULERLeave the current thread to allow another to run.

Macros

GET_THREAD_SCHEDULER_ACCESS

Acquire access to the thread scheduler task.

This doesn’t associate a thread with it, just limits access to one processor at a time.  As such, interrupts must be disabled already.

RELEASE_THREAD_SCHEDULER_ACCESS

Release access to the thread scheduler task so that another processor can access it.

Interrupts must remain disabled until after this access is released.

JMP_THREAD_SCHEDULER

Leave the current thread to allow another to run.

Note that this doesn’t reschedule the current thread, but does save its return address, since its TSS changes on the jump.

This file defines the thread scheduler task of PwnOS and associated functions.
This file defines thread management functions of PwnOS.
This file defines process management functions of PwnOS.
This file defines structures and cosntants for thread management functions of PwnOS.
This file defines structures and cosntants for process management functions of PwnOS.