diff options
Diffstat (limited to 'include/sys/signal.h')
-rw-r--r-- | include/sys/signal.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/include/sys/signal.h b/include/sys/signal.h new file mode 100644 index 0000000..02509ac --- /dev/null +++ b/include/sys/signal.h @@ -0,0 +1,41 @@ +/** + * \file + * \brief Override for newlib's sys/signal.h + * + * \author Copyright (C) 2015 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info + * + * \par License + * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not + * distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef INCLUDE_SYS_SIGNAL_H_ +#define INCLUDE_SYS_SIGNAL_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif /* def __cplusplus */ + +/*---------------------------------------------------------------------------------------------------------------------+ +| global types ++---------------------------------------------------------------------------------------------------------------------*/ + +/** pointer to function taking an int argument (required by newlib's signal.h) */ +typedef void (* _sig_func_ptr)(int); + +/** standard sigval union - integer and void pointer */ +union sigval +{ + /** integer signal value */ + int sival_int; + + /** pointer signal value */ + void* sival_ptr; +}; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* def __cplusplus */ + +#endif /* INCLUDE_SYS_SIGNAL_H_ */ |