Ruprecht Altenburger
/
mirror_actuator_preston
corrections altb2
Lib_Misc/ThreadFlag.h
- Committer:
- altb2
- Date:
- 2021-08-24
- Revision:
- 3:8aa09988fa58
- Parent:
- 0:d2e117716219
File content as of revision 3:8aa09988fa58:
/* * ThreadFlag.h * Copyright (c) 2019, ZHAW * All rights reserved. * * Created on: 29.11.2019 * Author: Marcel Honegger */ #ifndef THREAD_FLAG_H_ #define THREAD_FLAG_H_ #include <cstdlib> #include <stdint.h> #include <mbed.h> /** * This class manages the handling of unique thread flags to trigger rtos threads. */ class ThreadFlag { public: ThreadFlag(); virtual ~ThreadFlag(); virtual uint32_t read(); operator uint32_t(); private: static uint32_t threadFlags; // variable that holds all assigned thread flags uint32_t threadFlag; // thread flag of this object Mutex mutex; // mutex to lock critical sections }; #endif /* THREAD_FLAG_H_ */