pmon.h: Ensure compat. with v5.10 kernel

The v5.10 kernel no longer guards the task_state_notify_info data
structure with #ifdef CONFIG_SIGEXIT, which causes a
redefinition-related compilation error. Work around this by checking for
the existence of the PR_DO_NOTIFY_TASK_STATE macro, and only define the
PR_DO_NOTIFY_TASK_STATE and the task_state_notify_info structure if the
kernel does not do so.

Story: 2008921

Change-Id: I4bb499e2b52e20542f202dea1c2c55d88bb8ba61
Signed-off-by: M. Vefa Bicakci <vefa.bicakci@windriver.com>
This commit is contained in:
M. Vefa Bicakci 2021-07-27 16:19:55 -04:00
parent fc84f13b64
commit c6afe34112
1 changed files with 2 additions and 0 deletions

View File

@ -143,6 +143,7 @@ using namespace std;
/* New PRCTL Flag
*
* Set/get notification for task state changes */
#ifndef PR_DO_NOTIFY_TASK_STATE
#define PR_DO_NOTIFY_TASK_STATE 17
/* This is the data structure for requestion process death
@ -158,6 +159,7 @@ struct task_state_notify_info
int sig ;
unsigned int events;
};
#endif /* !PR_DO_NOTIFY_TASK_STATE */
/* The "events" bits in the struct correspond to the si_code values in the siginfo_t struct
* that would normally be sent along with a SIGCHLD to the parent process.