|
@@ -21,6 +21,7 @@
|
|
|
|
|
|
#define THREAD_PRIORITY_HIGH 21
|
|
|
#define THREAD_PRIORITY_LOW 30
|
|
|
+#define THREAD_STACK_SIZE UTEST_THR_STACK_SIZE
|
|
|
|
|
|
static rt_thread_t threads[2];
|
|
|
static struct rt_spinlock lock;
|
|
@@ -50,7 +51,7 @@ static void thread_low_entry(void *parameter)
|
|
|
static void thread_preemptions_tc(void)
|
|
|
{
|
|
|
/* Creating low-priority thread */
|
|
|
- threads[0] = rt_thread_create("tlow", thread_low_entry, RT_NULL, 1024, THREAD_PRIORITY_LOW, 10);
|
|
|
+ threads[0] = rt_thread_create("tlow", thread_low_entry, RT_NULL, THREAD_STACK_SIZE, THREAD_PRIORITY_LOW, 10);
|
|
|
if (threads[0] != RT_NULL)
|
|
|
{
|
|
|
uassert_true(1);
|
|
@@ -59,7 +60,7 @@ static void thread_preemptions_tc(void)
|
|
|
|
|
|
rt_thread_delay(5);
|
|
|
/* Creating high-priority thread */
|
|
|
- threads[1] = rt_thread_create("thigh", thread_high_entry, RT_NULL, 1024, THREAD_PRIORITY_HIGH, 10);
|
|
|
+ threads[1] = rt_thread_create("thigh", thread_high_entry, RT_NULL, THREAD_STACK_SIZE, THREAD_PRIORITY_HIGH, 10);
|
|
|
if (threads[1] != RT_NULL)
|
|
|
{
|
|
|
uassert_true(1);
|