[add] 修改线程栈大小为UTEST_THR_STACK_SIZE
This commit is contained in:
parent
f33312abe0
commit
5d4f8193aa
|
@ -22,7 +22,7 @@
|
|||
|
||||
/* Number of thread runs */
|
||||
static int run_num = 10;
|
||||
#define THREAD_STACK_SIZE 1024
|
||||
#define THREAD_STACK_SIZE UTEST_THR_STACK_SIZE
|
||||
#define THREAD_PRIORITY 2
|
||||
#define LOW_PRIORITY 50
|
||||
#define THIGH_PRIORITY 10
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
/* Number of thread runs */
|
||||
static int run_num = 10;
|
||||
#define THREAD_STACK_SIZE 1024
|
||||
#define THREAD_STACK_SIZE UTEST_THR_STACK_SIZE
|
||||
#define THREAD_PRIORITY 2
|
||||
#define LOW_PRIORITY 50
|
||||
#define THIGH_PRIORITY 10
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
* running on each core.
|
||||
*/
|
||||
|
||||
#define THREAD_STACK_SIZE 1024
|
||||
#define THREAD_STACK_SIZE UTEST_THR_STACK_SIZE
|
||||
#define THREAD_PRIORITY 20
|
||||
static rt_thread_t threads[RT_CPUS_NR];
|
||||
static int tick = 0, finsh_flag = 0;
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
/* Number of thread runs */
|
||||
static int run_num = 100;
|
||||
#define THREAD_STACK_SIZE 1024
|
||||
#define THREAD_STACK_SIZE UTEST_THR_STACK_SIZE
|
||||
#define THREAD_PRIORITY 20
|
||||
static rt_thread_t threads[RT_CPUS_NR];
|
||||
static struct rt_spinlock lock;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#define THREAD_PRIORITY 20
|
||||
#define THREAD_TIMESLICE 20
|
||||
#define THREAD_STACK_SIZE 1024
|
||||
#define THREAD_STACK_SIZE UTEST_THR_STACK_SIZE
|
||||
static rt_thread_t thread1;
|
||||
static rt_thread_t thread2;
|
||||
static rt_uint8_t finsh_flag = 0;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue