blob: cf74b504f870223c6cdebc34366333e64f88d3f6 [file] [log] [blame]
Richard Hendersona3310c02021-11-15 14:08:52 +01001/*
2 * safe-syscall-error.c: errno setting fragment
3 * This is intended to be invoked by safe-syscall.S
4 *
5 * Written by Richard Henderson <rth@twiddle.net>
6 * Copyright (C) 2021 Red Hat, Inc.
7 *
8 * This work is licensed under the terms of the GNU GPL, version 2 or later.
9 * See the COPYING file in the top-level directory.
10 */
11
12#include "qemu/osdep.h"
Richard Hendersonbbf15aa2021-11-17 16:14:00 +010013#include "user/safe-syscall.h"
Richard Hendersona3310c02021-11-15 14:08:52 +010014
Richard Hendersona3310c02021-11-15 14:08:52 +010015/*
16 * This is intended to be invoked via tail-call on the error path
17 * from the assembly in host/arch/safe-syscall.inc.S. This takes
18 * care of the host specific addressing of errno.
19 * Return -1 to finalize the return value for safe_syscall_base.
20 */
21long safe_syscall_set_errno_tail(int value)
22{
23 errno = value;
24 return -1;
25}