From 92235fb259b0ebdfc99859c2c95fe1f8c163f411 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Tue, 8 Nov 2016 20:09:05 -0500 Subject: trying out distortos --- include/sys/signal.h | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 include/sys/signal.h (limited to 'include/sys/signal.h') 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_ */ -- cgit v1.2.3