summaryrefslogtreecommitdiff
path: root/zap/source/any/mth/div0.c
blob: 87fcfa0ff5b20b8175302dfb994f73c007ac84bf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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;
}