]> git.saurik.com Git - apple/xnu.git/blame - osfmk/ppc/thread.h
xnu-344.34.tar.gz
[apple/xnu.git] / osfmk / ppc / thread.h
CommitLineData
1c79356b
A
1/*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
de355530
A
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.
1c79356b 11 *
de355530
A
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
1c79356b
A
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
de355530
A
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
18 * under the License.
1c79356b
A
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22/*
23 * @OSF_COPYRIGHT@
24 */
25
26/*
27 * File: machine/thread.h
28 *
29 * This file contains the structure definitions for the thread
30 * state as applied to PPC processors.
31 */
32
33#ifndef _PPC_THREAD_H_
34#define _PPC_THREAD_H_
35
36#include <mach/machine/vm_types.h>
37
38/*
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
43 * return this.
44 */
45
46extern vm_offset_t getrpc(void);
47#define GET_RETURN_PC(addr) getrpc()
48
49#define STACK_IKS(stack) \
50 ((vm_offset_t)(((vm_offset_t)stack)+KERNEL_STACK_SIZE)-FM_SIZE)
51
52#define syscall_emulation_sync(task) /* do nothing */
53
54/*
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.
58 */
59
60#define MACHINE_FAST_EXCEPTION 1
61
62#endif /* _PPC_THREAD_H_ */
63
64