__getcontext.s revision 6515:10dab2b883e0
1109998Smarkm/* 2194206Ssimon * CDDL HEADER START 3109998Smarkm * 4109998Smarkm * The contents of this file are subject to the terms of the 5109998Smarkm * Common Development and Distribution License (the "License"). 6109998Smarkm * You may not use this file except in compliance with the License. 7109998Smarkm * 8109998Smarkm * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9109998Smarkm * or http://www.opensolaris.org/os/licensing. 10109998Smarkm * See the License for the specific language governing permissions 11109998Smarkm * and limitations under the License. 12109998Smarkm * 13109998Smarkm * When distributing Covered Code, include this CDDL HEADER in each 14109998Smarkm * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15109998Smarkm * If applicable, add the following below this CDDL HEADER, with the 16109998Smarkm * fields enclosed by brackets "[]" replaced with your own identifying 17109998Smarkm * information: Portions Copyright [yyyy] [name of copyright owner] 18109998Smarkm * 19109998Smarkm * CDDL HEADER END 20109998Smarkm */ 21109998Smarkm 22109998Smarkm/* 23109998Smarkm * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 24109998Smarkm * Use is subject to license terms. 25109998Smarkm */ 26109998Smarkm 27109998Smarkm#pragma ident "%Z%%M% %I% %E% SMI" 28109998Smarkm 29109998Smarkm .file "%M%" 30109998Smarkm 31109998Smarkm/* 32109998Smarkm * __getcontext() must be implemented in assembler, as opposed 33109998Smarkm * to the other members of the SYS_context family (see ucontext.c) 34109998Smarkm * because we must be careful to get the precise context of the caller. 35109998Smarkm */ 36109998Smarkm 37109998Smarkm#include "SYS.h" 38109998Smarkm 39109998Smarkm ENTRY(__getcontext) 40109998Smarkm mov %o0, %o1 41109998Smarkm mov 0, %o0 42109998Smarkm SYSTRAP_RVAL1(context) 43109998Smarkm SYSCERROR 44109998Smarkm RET 45109998Smarkm SET_SIZE(__getcontext) 46109998Smarkm