aboutsummaryrefslogtreecommitdiffstats
path: root/docs/src/atomic.dox
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-01-19 15:10:41 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-01-19 15:10:41 +0000
commit79089d6352e01e1e7c6c3f0a88266abbc9af6abb (patch)
tree0ad16ec06bc8f671018a82fb2360f0eefac1ca24 /docs/src/atomic.dox
parent0810f1daac3c33d194d573d82ec436021e3e7255 (diff)
downloadChibiOS-79089d6352e01e1e7c6c3f0a88266abbc9af6abb.tar.gz
ChibiOS-79089d6352e01e1e7c6c3f0a88266abbc9af6abb.tar.bz2
ChibiOS-79089d6352e01e1e7c6c3f0a88266abbc9af6abb.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@644 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'docs/src/atomic.dox')
-rw-r--r--docs/src/atomic.dox12
1 files changed, 2 insertions, 10 deletions
diff --git a/docs/src/atomic.dox b/docs/src/atomic.dox
index 0f678448b..22601d8d9 100644
--- a/docs/src/atomic.dox
+++ b/docs/src/atomic.dox
@@ -30,16 +30,8 @@
chSemSignalI(&sem1);
chSemSignalI(&sem2);
- /*
- * The "if" is required because the chSemWaitS() does not always internally
- * reschedule.
- */
- if (chSemGetCounter(&sem3) <= 0)
- chSemWaitS(&Sem3);
- else {
- chSemFastWaitS(&sem3);
- chSchRescheduleS();
- }
+ chSemWaitS(&Sem3);
+ chSchRescheduleS(); /* Because chSemWaitS() might not reschedule internally.*/
chSysUnlock();
* @endcode