Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed DS18B20 TextLCD
Diff: atomic_flag.h
- Revision:
- 0:55c37ea095b0
diff -r 000000000000 -r 55c37ea095b0 atomic_flag.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/atomic_flag.h Thu Feb 13 16:27:38 2020 +0000
@@ -0,0 +1,13 @@
+#include <mbed.h>
+
+class atomic_flag {
+ volatile core_util_atomic_flag _data;
+public:
+ atomic_flag() { clear(); }
+ atomic_flag( const atomic_flag& );
+ atomic_flag& operator=( const atomic_flag& );
+ atomic_flag& operator=( const atomic_flag& ) volatile;
+ void clear() { core_util_atomic_flag_clear(&_data); }
+ bool test_and_set() { return core_util_atomic_flag_test_and_set(&_data); }
+};
+
\ No newline at end of file