net: Introduce NetClientInfo.check_peer_type()
[qemu/ar7.git] / bsd-user / i386 / target_arch_thread.h
blobe65e476f75779f1f6ba4bd423ba0f3b2455cbd23
1 /*
2 * i386 thread support
4 * Copyright (c) 2013 Stacey D. Son
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
19 #ifndef _TARGET_ARCH_THREAD_H_
20 #define _TARGET_ARCH_THREAD_H_
22 /* Compare to vm_machdep.c cpu_set_upcall_kse() */
23 static inline void target_thread_set_upcall(CPUX86State *regs, abi_ulong entry,
24 abi_ulong arg, abi_ulong stack_base, abi_ulong stack_size)
26 /* XXX */
29 static inline void target_thread_init(struct target_pt_regs *regs,
30 struct image_info *infop)
32 regs->esp = infop->start_stack;
33 regs->eip = infop->entry;
36 * SVR4/i386 ABI (pages 3-31, 3-32) says that when the program starts %edx
37 * contains a pointer to a function which might be registered using
38 * `atexit'. This provides a mean for the dynamic linker to call DT_FINI
39 * functions for shared libraries that have been loaded before the code
40 * runs.
42 * A value of 0 tells we have no such handler.
44 regs->edx = 0;
47 #endif /* !_TARGET_ARCH_THREAD_H_ */