Revision 1e5f7648 os/core/inc/aos_thread.h
os/core/inc/aos_thread.h | ||
---|---|---|
25 | 25 |
/** |
26 | 26 |
* @brief Minimum thread priority. |
27 | 27 |
*/ |
28 |
#define AOS_THD_LOWPRIO_MIN ((tprio_t)(LOWPRIO)) |
|
28 |
#define AOS_THD_LOWPRIO_MIN ((tprio_t)(LOWPRIO))
|
|
29 | 29 |
|
30 | 30 |
/** |
31 | 31 |
* @brief Maximum priority for background threads. |
32 | 32 |
*/ |
33 |
#define AOS_THD_LOWPRIO_MAX ((tprio_t)(LOWPRIO + ((NORMALPRIO - LOWPRIO) / 2))) |
|
33 |
#define AOS_THD_LOWPRIO_MAX ((tprio_t)(LOWPRIO + ((NORMALPRIO - LOWPRIO) / 2)))
|
|
34 | 34 |
|
35 | 35 |
/** |
36 | 36 |
* @brief Minimum priority for normal/standard threads. |
37 | 37 |
*/ |
38 |
#define AOS_THD_NORMALPRIO_MIN ((tprio_t)(AOS_THD_LOWPRIO_MAX + 1)) |
|
38 |
#define AOS_THD_NORMALPRIO_MIN ((tprio_t)(AOS_THD_LOWPRIO_MAX + 1))
|
|
39 | 39 |
|
40 | 40 |
/** |
41 | 41 |
* @brief Maximum priority for normal/standard threads. |
42 | 42 |
*/ |
43 |
#define AOS_THD_NORMALPRIO_MAX ((tprio_t)(NORMALPRIO)) |
|
43 |
#define AOS_THD_NORMALPRIO_MAX ((tprio_t)(NORMALPRIO))
|
|
44 | 44 |
|
45 | 45 |
/** |
46 | 46 |
* @brief Minimum priority for important threads. |
47 | 47 |
*/ |
48 |
#define AOS_THD_HIGHPRIO_MIN ((tprio_t)(NORMALPRIO + 1)) |
|
48 |
#define AOS_THD_HIGHPRIO_MIN ((tprio_t)(NORMALPRIO + 1))
|
|
49 | 49 |
|
50 | 50 |
/** |
51 | 51 |
* @brief Maximum priority for important threads. |
52 | 52 |
*/ |
53 |
#define AOS_THD_HIGHPRIO_MAX ((tprio_t)(NORMALPRIO + ((HIGHPRIO - NORMALPRIO) / 2))) |
|
53 |
#define AOS_THD_HIGHPRIO_MAX ((tprio_t)(NORMALPRIO + ((HIGHPRIO - NORMALPRIO) / 2)))
|
|
54 | 54 |
|
55 | 55 |
/** |
56 | 56 |
* @brief Minimum priority for real-time threads. |
57 | 57 |
*/ |
58 |
#define AOS_THD_RTPRIO_MIN ((tprio_t)(AOS_THD_HIGHPRIO_MAX + 1)) |
|
58 |
#define AOS_THD_RTPRIO_MIN ((tprio_t)(AOS_THD_HIGHPRIO_MAX + 1))
|
|
59 | 59 |
|
60 | 60 |
/** |
61 | 61 |
* @brief Maximum priority for real-time threads. |
62 | 62 |
*/ |
63 |
#define AOS_THD_RTPRIO_MAX ((tprio_t)(HIGHPRIO - 1)) |
|
63 |
#define AOS_THD_RTPRIO_MAX ((tprio_t)(HIGHPRIO - 1))
|
|
64 | 64 |
|
65 | 65 |
/** |
66 | 66 |
* @brief Priority for the system control thread. |
67 | 67 |
*/ |
68 |
#define AOS_THD_CTRLPRIO ((tprio_t)(HIGHPRIO)) |
|
68 |
#define AOS_THD_CTRLPRIO ((tprio_t)(HIGHPRIO))
|
|
69 | 69 |
|
70 | 70 |
/** |
71 | 71 |
* @brief Maximum timeframe that can be slept in system ticks. |
72 | 72 |
*/ |
73 |
#define AOS_THD_MAX_SLEEP_ST TIME_MAX_INTERVAL |
|
73 |
#define AOS_THD_MAX_SLEEP_ST TIME_MAX_INTERVAL
|
|
74 | 74 |
|
75 | 75 |
/** |
76 | 76 |
* @brief Maximum timeframe that can be slept in seconds. |
77 | 77 |
*/ |
78 |
#define AOS_THD_MAX_SLEEP_S (TIME_I2S(AOS_THD_MAX_SLEEP_ST) - 1)
|
|
78 |
#define AOS_THD_MAX_SLEEP_S (chTimeI2S(AOS_THD_MAX_SLEEP_ST) - 1)
|
|
79 | 79 |
|
80 | 80 |
/** |
81 | 81 |
* @brief Maximum timeframe that can be slept in milliseconds. |
82 | 82 |
*/ |
83 |
#define AOS_THD_MAX_SLEEP_MS (TIME_I2MS(AOS_THD_MAX_SLEEP_ST) - 1)
|
|
83 |
#define AOS_THD_MAX_SLEEP_MS (chTimeI2MS(AOS_THD_MAX_SLEEP_ST) - 1)
|
|
84 | 84 |
|
85 | 85 |
/** |
86 | 86 |
* @brief Maximum timeframe that can be slept in microseconds. |
87 | 87 |
*/ |
88 |
#define AOS_THD_MAX_SLEEP_US (TIME_I2US(AOS_THD_MAX_SLEEP_ST) - 1)
|
|
88 |
#define AOS_THD_MAX_SLEEP_US (chTimeI2US(AOS_THD_MAX_SLEEP_ST) - 1)
|
|
89 | 89 |
|
90 | 90 |
#ifdef __cplusplus |
91 | 91 |
extern "C" { |
Also available in: Unified diff