signal: Make struct sigevent compatible with glibc
This patch added compatible struct sigevent definition with glibc. Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
This commit is contained in:
parent
5a01f0f7f6
commit
5975cc9d96
@ -337,19 +337,33 @@ union sigval
|
||||
|
||||
typedef CODE void (*sigev_notify_function_t)(union sigval value);
|
||||
|
||||
struct sigevent
|
||||
typedef struct sigevent
|
||||
{
|
||||
uint8_t sigev_notify; /* Notification method: SIGEV_SIGNAL, SIGEV_NONE, or SIGEV_THREAD */
|
||||
uint8_t sigev_signo; /* Notification signal */
|
||||
union sigval sigev_value; /* Data passed with notification */
|
||||
|
||||
union
|
||||
{
|
||||
#ifdef CONFIG_SIG_EVTHREAD
|
||||
sigev_notify_function_t sigev_notify_function; /* Notification function */
|
||||
FAR struct pthread_attr_s *sigev_notify_attributes; /* Notification attributes (not used) */
|
||||
#endif
|
||||
struct
|
||||
{
|
||||
/* Notification function */
|
||||
|
||||
pid_t sigev_notify_thread_id; /* ID of thread to signal */
|
||||
};
|
||||
sigev_notify_function_t _function;
|
||||
|
||||
/* Notification attributes (not used) */
|
||||
|
||||
FAR struct pthread_attr_s *_attribute;
|
||||
} _sigev_thread;
|
||||
#endif
|
||||
pid_t _tid; /* ID of thread to signal */
|
||||
} _sigev_un;
|
||||
} sigevent_t;
|
||||
|
||||
#define sigev_notify_function _sigev_un._sigev_thread._function
|
||||
#define sigev_notify_attributes _sigev_un._sigev_thread._attribute
|
||||
#define sigev_notify_thread_id _sigev_un._tid
|
||||
|
||||
/* The following types is used to pass parameters to/from signal handlers */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user