From: bernie Date: Sun, 10 Aug 2008 10:02:25 +0000 (+0000) Subject: SCHED_ENQUEUE(): Enhance documentation X-Git-Tag: 2.0.0~341 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=9607fc3f839ba8914bf9847d7998a14c986881ab;p=bertos.git SCHED_ENQUEUE(): Enhance documentation git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1593 38d2e660-2303-0410-9eaa-f027e97ec537 --- 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)