File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88
99/* Uncomment this to allow the scheduler to interrupt long running processes */
1010// This requires _PROCESS_EXCEPTION_HANDLING to also be enabled
11- // #define _PROCESS_TIMEOUT_INTERRUPTS
11+ #define _PROCESS_TIMEOUT_INTERRUPTS
1212
1313/* Uncomment this to allow Process timing statistics functionality */
1414#define _PROCESS_STATISTICS
Original file line number Diff line number Diff line change @@ -18,6 +18,20 @@ typedef enum ProcessWarning
1818#endif
1919} ProcessWarning;
2020
21+ // Process period
22+ #define SERVICE_CONSTANTLY 0
23+ #define SERVICE_SECONDLY 1000
24+ #define SERVICE_MINUTELY 60000
25+ #define SERVICE_HOURLY 3600000
26+
27+ // Number of Processs
28+ #define RUNTIME_FOREVER -1
29+ #define RUNTIME_ONCE 1
30+
31+ #define PROCESS_NO_TIMEOUT 0
32+
33+ #define OVERSCHEDULED_NO_WARNING 0
34+
2135// PICK INT VALUES PEOPLE UNLIKLEY TO USE
2236#define LONGJMP_ISR_CODE -1000
2337#define LONGJMP_YIELD_CODE -1001
Original file line number Diff line number Diff line change 1414 this ->_force = false ;
1515 this ->_overSchedThresh = overSchedThresh;
1616 this ->_pBehind = 0 ;
17+ #ifdef _PROCESS_TIMEOUT_INTERRUPTS
18+ setTimeout (PROCESS_NO_TIMEOUT);
19+ #endif
1720 }
1821
1922
Original file line number Diff line number Diff line change 44#include " Includes.h"
55#include " Scheduler.h"
66
7- // Process period
8- #define SERVICE_CONSTANTLY 0
9- #define SERVICE_SECONDLY 1000
10- #define SERVICE_MINUTELY 60000
11- #define SERVICE_HOURLY 3600000
12-
13- // Number of Processs
14- #define RUNTIME_FOREVER -1
15- #define RUNTIME_ONCE 1
16-
17- #define OVERSCHEDULED_NO_WARNING 0
18-
197class Scheduler ;
208
219
@@ -51,9 +39,6 @@ class Process
5139
5240 inline ProcPriority getPriority () { return _pLevel; }
5341
54- // Timeout
55- virtual uint32_t getTimeout () { return 0 ; };
56-
5742protected:
5843 inline uint32_t getStartDelay () { return _actualTS - _scheduledTS; }
5944 // Fired on creation/destroy
@@ -112,6 +97,12 @@ class Process
11297
11398#ifdef _PROCESS_TIMEOUT_INTERRUPTS
11499
100+ public:
101+ inline uint32_t getTimeout () {return _timeout;}
102+ protected:
103+ inline void setTimeout (uint32_t timeout) { _timeout = timeout; }
104+ private:
105+ uint32_t _timeout;
115106
116107#endif
117108
You can’t perform that action at this time.
0 commit comments