diff options
Diffstat (limited to 'zap/source/any/math/div0.c')
-rw-r--r-- | zap/source/any/math/div0.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/zap/source/any/math/div0.c b/zap/source/any/math/div0.c new file mode 100644 index 0000000..87fcfa0 --- /dev/null +++ b/zap/source/any/math/div0.c @@ -0,0 +1,22 @@ +/* + Copyright 2022-2023 Gabriel Jensen. + 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 <https://mozilla.org/MPL/2.0>. +*/ + +#include <zap/math.h> + +#include <csys.h> + +#if csys_os_linux +#include <asm/unistd.h> +#endif + +zap_i04 zap_priv_div0(void) { +#if defined(zap_priv_signaldiv0) +#if csys_os_linux + csys_syscall(__NR_kill,csys_syscall(__NR_getpid),0x8u); +#endif +#endif + return (zap_i04)-0x1; +} |