Merge tag 'v9.0.0-rc3'
[qemu/ar7.git] / bsd-user / x86_64 / target_arch_thread.h
blob52c28906d6dd8335caebfcf376b95249d9757af0
1 /*
2 * x86_64 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/>.
20 #ifndef TARGET_ARCH_THREAD_H
21 #define TARGET_ARCH_THREAD_H
23 /* Compare to vm_machdep.c cpu_set_upcall_kse() */
24 static inline void target_thread_set_upcall(CPUX86State *regs, abi_ulong entry,
25 abi_ulong arg, abi_ulong stack_base, abi_ulong stack_size)
27 /* XXX */
30 static inline void target_thread_init(struct target_pt_regs *regs,
31 struct image_info *infop)
33 regs->rax = 0;
34 regs->rsp = infop->start_stack;
35 regs->rip = infop->entry;
36 regs->rdi = infop->start_stack;
39 #endif /* TARGET_ARCH_THREAD_H */