signal: Replace NuttX special SIGWORK with SIGPAGING(SIGRTMIN)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2023-03-25 04:12:41 +08:00 committed by patacongo
parent 5ce5d01d75
commit beb38917d1
5 changed files with 6 additions and 15 deletions

View File

@ -160,12 +160,6 @@
#define SIGIO SIGPOLL
/* The following are non-standard signal definitions */
/* SIGWORK is used to wake up various internal NuttX worker threads */
#define SIGWORK 31 /* Used to wake up the work queue */
/* sigprocmask() "how" definitions. Only one of the following can be specified: */
#define SIG_BLOCK 1 /* Block the given signals */

View File

@ -158,13 +158,6 @@ FAR char *strsignal(int signum)
return (FAR char *)"SIGTERM";
#endif
/* Non-standard signals */
#ifdef SIGWORK
case SIGWORK:
return (FAR char *)"SIGWORK";
#endif
default:
break;
}

View File

@ -27,6 +27,8 @@
#include <nuttx/config.h>
#include <signal.h>
#ifdef CONFIG_PAGING
/****************************************************************************
@ -51,6 +53,8 @@
# define CONFIG_PAGING_STACKSIZE CONFIG_IDLETHREAD_STACKSIZE
#endif
#define SIGPAGING SIGRTMIN
/****************************************************************************
* Public Data
****************************************************************************/

View File

@ -179,7 +179,7 @@ void pg_miss(void)
if (!g_pftcb)
{
pginfo("Signaling worker. PID: %d\n", g_pgworker);
nxsig_kill(g_pgworker, SIGWORK);
nxsig_kill(g_pgworker, SIGPAGING);
}
}

View File

@ -177,7 +177,7 @@ static void pg_callback(FAR struct tcb_s *tcb, int result)
/* Signal the page fill worker thread (in any event) */
pginfo("Signaling worker. PID: %d\n", g_pgworker);
nxsig_kill(g_pgworker, SIGWORK);
nxsig_kill(g_pgworker, SIGPAGING);
}
#endif