diff options
Diffstat (limited to 'docs/src/atomic.dox')
-rw-r--r-- | docs/src/atomic.dox | 12 |
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
|