mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-02-06 17:12:01 +08:00
🎈 perf: perf rt_hw_interrupt_disable/enable (#8042)
Signed-off-by: Shell <smokewood@qq.com> Co-authored-by: Shell <smokewood@qq.com>
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
* Date Author Notes
|
||||
* 2022-07-27 flybreak the first version
|
||||
* 2023-03-21 WangShun add atomic test
|
||||
* 2023-09-15 xqyjlj change stack size in cpu64
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
|
||||
@@ -6,12 +6,14 @@
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2021-08-15 liukang the first version
|
||||
* 2023-09-15 xqyjlj change stack size in cpu64
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
#include "utest.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#define THREAD_STACKSIZE UTEST_THR_STACK_SIZE
|
||||
#define EVENT_FLAG3 (1 << 3)
|
||||
#define EVENT_FLAG5 (1 << 5)
|
||||
|
||||
|
||||
@@ -6,12 +6,15 @@
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2021-09-08 liukang the first version
|
||||
* 2023-09-15 xqyjlj change stack size in cpu64
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
#include "utest.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#define THREAD_STACKSIZE UTEST_THR_STACK_SIZE
|
||||
|
||||
static struct rt_mailbox test_static_mb;
|
||||
static char mb_pool[128];
|
||||
|
||||
|
||||
@@ -6,11 +6,15 @@
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2021-08-28 Sherman the first version
|
||||
* 2023-09-15 xqyjlj change stack size in cpu64
|
||||
* fix in smp
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
#include "utest.h"
|
||||
|
||||
#define THREAD_STACKSIZE UTEST_THR_STACK_SIZE
|
||||
|
||||
#define MSG_SIZE 4
|
||||
#define MAX_MSGS 5
|
||||
|
||||
@@ -202,6 +206,11 @@ static rt_err_t utest_tc_init(void)
|
||||
if(ret != RT_EOK)
|
||||
return -RT_ERROR;
|
||||
|
||||
#ifdef RT_USING_SMP
|
||||
rt_thread_control(&mq_send_thread, RT_THREAD_CTRL_BIND_CPU, (void *)0);
|
||||
rt_thread_control(&mq_recv_thread, RT_THREAD_CTRL_BIND_CPU, (void *)0);
|
||||
#endif
|
||||
|
||||
ret = rt_event_init(&finish_e, "finish", RT_IPC_FLAG_FIFO);
|
||||
if(ret != RT_EOK)
|
||||
return -RT_ERROR;
|
||||
|
||||
@@ -6,12 +6,19 @@
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2021-09.01 luckyzjq the first version
|
||||
* 2023-09-15 xqyjlj change stack size in cpu64
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
#include <stdlib.h>
|
||||
#include "utest.h"
|
||||
|
||||
#ifdef ARCH_CPU_64BIT
|
||||
#define THREAD_STACKSIZE 4096
|
||||
#else
|
||||
#define THREAD_STACKSIZE 1024
|
||||
#endif
|
||||
|
||||
static struct rt_mutex static_mutex;
|
||||
|
||||
#ifdef RT_USING_HEAP
|
||||
@@ -84,7 +91,7 @@ static void test_static_mutex_take(void)
|
||||
rt_thread_t tid = rt_thread_create("mutex_th",
|
||||
static_mutex_take_entry,
|
||||
&static_mutex,
|
||||
2048,
|
||||
THREAD_STACKSIZE,
|
||||
10,
|
||||
10);
|
||||
if (RT_NULL == tid)
|
||||
@@ -145,7 +152,7 @@ static void test_static_mutex_release(void)
|
||||
rt_thread_t tid = rt_thread_create("mutex_th",
|
||||
static_mutex_release_entry,
|
||||
&static_mutex,
|
||||
2048,
|
||||
THREAD_STACKSIZE,
|
||||
10,
|
||||
10);
|
||||
if (RT_NULL == tid)
|
||||
@@ -200,7 +207,7 @@ static void test_static_mutex_trytake(void)
|
||||
rt_thread_t tid = rt_thread_create("mutex_th",
|
||||
static_mutex_trytake_entry,
|
||||
&static_mutex,
|
||||
2048,
|
||||
THREAD_STACKSIZE,
|
||||
10,
|
||||
10);
|
||||
if (RT_NULL == tid)
|
||||
@@ -397,7 +404,7 @@ static void test_dynamic_mutex_take(void)
|
||||
rt_thread_t tid = rt_thread_create("mutex_th",
|
||||
dynamic_mutex_take_entry,
|
||||
dynamic_mutex,
|
||||
2048,
|
||||
THREAD_STACKSIZE,
|
||||
10,
|
||||
10);
|
||||
if (RT_NULL == tid)
|
||||
@@ -458,7 +465,7 @@ static void test_dynamic_mutex_release(void)
|
||||
rt_thread_t tid = rt_thread_create("mutex_th",
|
||||
dynamic_mutex_release_entry,
|
||||
dynamic_mutex,
|
||||
2048,
|
||||
THREAD_STACKSIZE,
|
||||
10,
|
||||
10);
|
||||
if (RT_NULL == tid)
|
||||
@@ -513,7 +520,7 @@ static void test_dynamic_mutex_trytake(void)
|
||||
rt_thread_t tid = rt_thread_create("mutex_th",
|
||||
dynamic_mutex_trytake_entry,
|
||||
dynamic_mutex,
|
||||
2048,
|
||||
THREAD_STACKSIZE,
|
||||
10,
|
||||
10);
|
||||
if (RT_NULL == tid)
|
||||
|
||||
Reference in New Issue
Block a user