try catch 不处理动态内存,拆分riscv_rest
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "errno.h"
|
||||
#include "stdio.h"
|
||||
#include "string.h"
|
||||
#include "exception.h"
|
||||
|
||||
#include "signal_test.h"
|
||||
|
||||
@@ -120,7 +121,7 @@ static test_sig_obj g_sig_obj = { .test_var = 1, };
|
||||
static test_sig_obj2 g_sig_obj2 = { .test_var = 2, };
|
||||
static test_sig_obj3 g_sig_obj3;
|
||||
|
||||
int thread_fun(void* t) {
|
||||
int thread_fun_s(void* t) {
|
||||
mythread_t* th = sigthread_init();
|
||||
printf("thread_fun start\n");
|
||||
connect(&g_sig_obj, test_signal, th, &g_sig_obj2, test_slot);
|
||||
@@ -132,6 +133,8 @@ int thread_fun(void* t) {
|
||||
emit test_signal2(&g_sig_obj, 5, 6,"hello world");
|
||||
mdelay(1000);
|
||||
printf("test end\n");
|
||||
throw_("my err");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user