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.
ThreadFlag.h
00001 /* 00002 * ThreadFlag.h 00003 * Copyright (c) 2020, ZHAW 00004 * All rights reserved. 00005 */ 00006 00007 #ifndef THREAD_FLAG_H_ 00008 #define THREAD_FLAG_H_ 00009 00010 #include <cstdlib> 00011 #include <mbed.h> 00012 00013 /** 00014 * This class manages the handling of unique thread flags to trigger rtos threads. 00015 */ 00016 class ThreadFlag { 00017 00018 public: 00019 00020 ThreadFlag(); 00021 virtual ~ThreadFlag(); 00022 virtual unsigned int read(); 00023 operator unsigned int(); 00024 00025 private: 00026 00027 static unsigned int threadFlags; // variable that holds all assigned thread flags 00028 unsigned int threadFlag; // thread flag of this object 00029 Mutex mutex; // mutex to lock critical sections 00030 }; 00031 00032 #endif /* THREAD_FLAG_H_ */ 00033
Generated on Tue Jul 12 2022 17:56:06 by
1.7.2