e96d02984c
Both SDK 0.10.0-beta2 and the ARM gcc 2018q2 run into a build issue with newlib and conflict definitions of mode_t type. First we need to add some ifdef protection if mode_t is already defined and set _MODE_T_DECLARED if we are the first to define it. Secondarily, we rename include/posix/sys/types.h to include/posix/posix_types.h so that we aren't getting a name collusion with the system sys/types.h and that we can easily and clearily include it (which we need to do to pull in the info from newlib). Fixes: #12224 Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
47 lines
730 B
C
47 lines
730 B
C
/*
|
|
* Copyright (c) 2018 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
#ifndef ZEPHYR_INCLUDE_POSIX_SIGNAL_H_
|
|
#define ZEPHYR_INCLUDE_POSIX_SIGNAL_H_
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "posix_types.h"
|
|
|
|
#ifndef SIGEV_NONE
|
|
#define SIGEV_NONE 1
|
|
#endif
|
|
|
|
#ifndef SIGEV_SIGNAL
|
|
#define SIGEV_SIGNAL 2
|
|
#endif
|
|
|
|
#ifndef SIGEV_THREAD
|
|
#define SIGEV_THREAD 3
|
|
#endif
|
|
|
|
typedef union sigval {
|
|
int sival_int;
|
|
void *sival_ptr;
|
|
} sigval;
|
|
|
|
typedef struct sigevent {
|
|
int sigev_notify;
|
|
int sigev_signo;
|
|
sigval sigev_value;
|
|
void (*sigev_notify_function)(sigval val);
|
|
#ifdef CONFIG_PTHREAD_IPC
|
|
pthread_attr_t *sigev_notify_attributes;
|
|
#endif
|
|
} sigevent;
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* POSIX__SIGNAL_H */
|