diff options
author | Richard Braun <rbraun@sceen.net> | 2013-03-17 21:06:31 +0100 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2013-03-17 21:06:31 +0100 |
commit | 784211ffc825480fcd3469b53b68404ab5b84c07 (patch) | |
tree | ed440158950f3a6f17f3400334f2a242de2dd641 /kern/thread.h | |
parent | ca2f92953a4000544479b81412031f1c63b0f74e (diff) |
kern/thread: document scheduling
Diffstat (limited to 'kern/thread.h')
-rw-r--r-- | kern/thread.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/kern/thread.h b/kern/thread.h index bc28eebd..388b3ef5 100644 --- a/kern/thread.h +++ b/kern/thread.h @@ -13,6 +13,22 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * + * The thread module aims at providing an interface suitable to implement + * POSIX scheduling policies. As such, it provides scheduling classes and + * policies that closely match the standard ones. The "real-time" policies + * (FIFO and RR) directly map the first-in first-out (SCHED_FIFO) and + * round-robin (SCHED_RR) policies, while the "time-sharing" policy (TS, + * named that way because, unlike real-time threads, time sharing is enforced) + * can be used for the normal SCHED_OTHER policy. The idle policy is reserved + * for idling kernel threads. + * + * By convention, the name of a kernel thread is built by prefixing the + * kernel name and adding the name of the start function, without the module + * name ("thread"). Threads that are bound to a processor also include the + * "/cpu_id" suffix. For example, "x15_balancer/1" is the name of the + * inter-processor balancing thread of the second processor. */ #ifndef _KERN_THREAD_H @@ -109,6 +125,8 @@ struct thread_ts_ctx { /* * Thread structure. + * + * TODO Document access synchronization. */ struct thread { struct tcb tcb; |