mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-02-04 13:01:39 +00:00
fix(components): validate RT_MAIN_THREAD_PRIORITY range at build time
This commit is contained in:
@@ -28,6 +28,11 @@
|
||||
#ifndef RT_MAIN_THREAD_PRIORITY
|
||||
#define RT_MAIN_THREAD_PRIORITY (RT_THREAD_PRIORITY_MAX / 3)
|
||||
#endif /* RT_MAIN_THREAD_PRIORITY */
|
||||
#if (RT_MAIN_THREAD_PRIORITY >= RT_THREAD_PRIORITY_MAX)
|
||||
#error "RT_MAIN_THREAD_PRIORITY must be < RT_THREAD_PRIORITY_MAX"
|
||||
#elif (RT_MAIN_THREAD_PRIORITY < 0)
|
||||
#error "RT_MAIN_THREAD_PRIORITY must be non-negative"
|
||||
#endif /* RT_MAIN_THREAD_PRIORITY range check */
|
||||
#endif /* RT_USING_USER_MAIN */
|
||||
|
||||
#ifdef RT_USING_COMPONENTS_INIT
|
||||
|
||||
Reference in New Issue
Block a user