File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ bool SimpleSpinLock::spinLock(unsigned long iterations) {
3232 return true ;
3333 }
3434 else {
35- taskManager. yieldForMicros ( 100 );
35+ delayMicroseconds ( 50 );
3636 }
3737 --iterations;
3838 }
Original file line number Diff line number Diff line change 66#ifndef TASKMANAGERIO_RENTRANTYIELDINGLOCK_H
77#define TASKMANAGERIO_RENTRANTYIELDINGLOCK_H
88
9+ #include < IoLogging.h>
910#include " TaskManagerIO.h"
1011
1112/* *
1213 * A very simple lock that can be used to provide a very simple mutex like behaviour based on task manager
1314 * atomic constructs. It has the ability to try and spin lock, and also to fully lock in conjunction with
14- * TaskMgrLock class.
15+ * TaskMgrLock class. Use only for activities that do not take very long, it cannot relinquish control to
16+ * task manager, it freezes the bus when locked. You must never call yieldForMicros while locked.
1517 */
1618class SimpleSpinLock {
1719private:
You can’t perform that action at this time.
0 commit comments