[rt-smart] 弱化 RT_USING_LWP,使用 RT_USING_SMART 作为宏配置 (#6740)

* [dfs] sync cromfs

* [rt-smart]Weaken RT_USING_LWP, use RT_USING_SMART as macro configuration

* [format] fix some format issue.
This commit is contained in:
guo
2022-12-16 18:38:28 +08:00
committed by GitHub
parent 3ea5166376
commit 68ca9f07a6
95 changed files with 322 additions and 336 deletions

View File

@@ -26,7 +26,7 @@
#include <rtthread.h>
#include <rthw.h>
#include <unistd.h>
#ifdef RT_USING_LWP
#ifdef RT_USING_SMART
#include "lwp.h"
#endif
#ifdef RT_USING_POSIX_DELAY
@@ -886,7 +886,7 @@ struct timer_obj
rt_uint32_t reload; /* Reload value in ms */
rt_uint32_t status;
int sigev_signo;
#ifdef RT_USING_LWP
#ifdef RT_USING_SMART
pid_t pid;
#endif
};
@@ -906,7 +906,7 @@ static void rtthread_timer_wrapper(void *timerobj)
if (timer->reload)
rt_timer_control(&timer->timer, RT_TIMER_CTRL_SET_TIME, &(timer->reload));
#ifdef RT_USING_LWP
#ifdef RT_USING_SMART
sys_kill(timer->pid, timer->sigev_signo);
#else
if(timer->sigev_notify_function != RT_NULL)
@@ -948,7 +948,7 @@ int timer_create(clockid_t clockid, struct sigevent *evp, timer_t *timerid)
rt_snprintf(timername, RT_NAME_MAX, "psx_tm%02d", num++);
num %= 100;
timer->sigev_signo = evp->sigev_signo;
#ifdef RT_USING_LWP
#ifdef RT_USING_SMART
timer->pid = lwp_self()->pid;
#endif
timer->sigev_notify_function = evp->sigev_notify_function;