A simpler test whether to use kernel's default scheduling

- this is a small addition to the userspace scheduling.
  proc_kernel_scheduler() tests whether to use the default scheduling
  policy in kernel. It is true if the process' scheduler is NULL _or_
  self. Currently none of the tests was complete.
This commit is contained in:
Tomas Hruby
2010-04-10 15:19:25 +00:00
parent 485a037563
commit 9fdb773cdb
2 changed files with 10 additions and 6 deletions

View File

@@ -148,6 +148,10 @@ struct proc {
#define proc_no_quantum(p) ((p)->p_rts_flags & RTS_NO_QUANTUM)
#define proc_ptr_ok(p) ((p)->p_magic == PMAGIC)
/* test whether the process is scheduled by the kernel's default policy */
#define proc_kernel_scheduler(p) ((p)->p_scheduler == NULL || \
(p)->p_scheduler == (p))
/* Macro to return: on which process is a certain process blocked?
* return endpoint number (can be ANY) or NONE. It's important to
* check RTS_SENDING first, and then RTS_RECEIVING, as they could