给线程发送信号
更多...
给线程发送信号
源码
#include <rtthread.h>
#define THREAD_PRIORITY 25
#define THREAD_STACK_SIZE 512
#define THREAD_TIMESLICE 5
void thread1_signal_handler(int sig)
{
}
static void thread1_entry(void *parameter)
{
int cnt = 0;
while (cnt < 10)
{
cnt++;
}
}
int signal_sample(void)
{
THREAD_STACK_SIZE,
THREAD_PRIORITY, THREAD_TIMESLICE);
return 0;
}