Talk:Embedded Systems/Locks and Critical Sections

CS function definintion and usage
After reading this article I was a little confused. If the top examples of EnterCS and ExitCS disable and enable the scheduler respectively, then their usage in the preemptive critical example indicates and a second task could not successfully call malloc since the EnterCS and ExitCS will disbale the scheduler ? Am I missing something ?

--imwhitey 11:46, 13 April 2006 (UTC)

Yes, you are missing the fact that ExitCS *enables* the scheduler. After that, then (eventually) the scheduler will get around to run the second task, and it will successfully call malloc. Does it make sense now? --DavidCary (talk) 03:15, 2 May 2008 (UTC)