From 9607fc3f839ba8914bf9847d7998a14c986881ab Mon Sep 17 00:00:00 2001 From: bernie Date: Sun, 10 Aug 2008 10:02:25 +0000 Subject: [PATCH] SCHED_ENQUEUE(): Enhance documentation git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1593 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/kern/proc_p.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/bertos/kern/proc_p.h b/bertos/kern/proc_p.h index d6979410..a0191d83 100644 --- a/bertos/kern/proc_p.h +++ b/bertos/kern/proc_p.h @@ -94,14 +94,24 @@ typedef struct Process /** Track running processes. */ extern REGISTER Process *CurrentProcess; -/** Track ready processes. */ +/** + * Track ready processes. + * + * Access to this list must be protected with a proc_forbid() / proc_premit() + * pair, or with SCHED_ATOMIC() + */ extern REGISTER List ProcReadyList; /** * Enqueue a task in the ready list. * - * \note This is *NOT* protected against + * Always use this macro to instert a process in the ready list, as its + * might vary to implement a different scheduling algorithms. + * + * \note This macro is *NOT* protected against the scheduler. Access to + * this list must be protected with a proc_forbid() / proc_premit() + * pair, or with SCHED_ATOMIC() */ #define SCHED_ENQUEUE(proc) ADDTAIL(&ProcReadyList, &(proc)->link) -- 2.25.1