]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/ppc/thread.h
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
27 * File: machine/thread.h
29 * This file contains the structure definitions for the thread
30 * state as applied to PPC processors.
33 #ifndef _PPC_THREAD_H_
34 #define _PPC_THREAD_H_
36 #include <mach/machine/vm_types.h>
39 * Return address of the function that called current function, given
40 * address of the first parameter of current function. We can't
41 * do it this way, since parameter was copied from a register
42 * into a local variable. Call an assembly sub-function to
46 extern vm_offset_t
getrpc(void);
47 #define GET_RETURN_PC(addr) getrpc()
49 #define STACK_IKS(stack) \
50 ((vm_offset_t)(((vm_offset_t)stack)+KERNEL_STACK_SIZE)-FM_SIZE)
52 #define syscall_emulation_sync(task) /* do nothing */
55 * Defining this indicates that MD code will supply an exception()
56 * routine, conformant with kern/exception.c (dependency alert!)
57 * but which does wonderfully fast, machine-dependent magic.
60 #define MACHINE_FAST_EXCEPTION 1
62 #endif /* _PPC_THREAD_H_ */