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
atomic_flag.h@0:55c37ea095b0, 2020-02-13 (annotated)
- Committer:
- KamilCuk
- Date:
- Thu Feb 13 16:27:38 2020 +0000
- Revision:
- 0:55c37ea095b0
Working version
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| KamilCuk | 0:55c37ea095b0 | 1 | #include <mbed.h> |
| KamilCuk | 0:55c37ea095b0 | 2 | |
| KamilCuk | 0:55c37ea095b0 | 3 | class atomic_flag { |
| KamilCuk | 0:55c37ea095b0 | 4 | volatile core_util_atomic_flag _data; |
| KamilCuk | 0:55c37ea095b0 | 5 | public: |
| KamilCuk | 0:55c37ea095b0 | 6 | atomic_flag() { clear(); } |
| KamilCuk | 0:55c37ea095b0 | 7 | atomic_flag( const atomic_flag& ); |
| KamilCuk | 0:55c37ea095b0 | 8 | atomic_flag& operator=( const atomic_flag& ); |
| KamilCuk | 0:55c37ea095b0 | 9 | atomic_flag& operator=( const atomic_flag& ) volatile; |
| KamilCuk | 0:55c37ea095b0 | 10 | void clear() { core_util_atomic_flag_clear(&_data); } |
| KamilCuk | 0:55c37ea095b0 | 11 | bool test_and_set() { return core_util_atomic_flag_test_and_set(&_data); } |
| KamilCuk | 0:55c37ea095b0 | 12 | }; |
| KamilCuk | 0:55c37ea095b0 | 13 |