master
h 40 lines 1.13 KB
Raw
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 * QEMU internal errno values for implementing user-only POSIX.
4 *
5 * Copyright (c) 2003 Fabrice Bellard
6 * Copyright (c) 2021 Linaro, Ltd.
7 */
8
9 #ifndef SPECIAL_ERRNO_H
10 #define SPECIAL_ERRNO_H
11
12 /*
13 * All of these are QEMU internal, not visible to the guest.
14 * They should be chosen so as to not overlap with any host
15 * or guest errno.
16 */
17
18 /*
19 * This is returned when a system call should be restarted, to tell the
20 * main loop that it should wind the guest PC backwards so it will
21 * re-execute the syscall after handling any pending signals.
22 */
23 #define QEMU_ERESTARTSYS 512
24
25 /*
26 * This is returned after a successful sigreturn syscall, to indicate
27 * that it has correctly set the guest registers and so the main loop
28 * should not touch them.
29 */
30 #define QEMU_ESIGRETURN 513
31
32 /*
33 * This is returned after a plugin has used the qemu_plugin_set_pc API, to
34 * indicate that the plugin deliberately changed the PC and potentially
35 * modified the register values. The main loop should not touch the guest
36 * registers for this reason.
37 */
38 #define QEMU_ESETPC 514
39
40 #endif /* SPECIAL_ERRNO_H */