ucontext.h revision 295561
154359Sroberto/*- 254359Sroberto * Copyright (c) 1999 Marcel Moolenaar 354359Sroberto * All rights reserved. 454359Sroberto * 5290001Sglebius * Redistribution and use in source and binary forms, with or without 6290001Sglebius * modification, are permitted provided that the following conditions 7290001Sglebius * are met: 854359Sroberto * 1. Redistributions of source code must retain the above copyright 9290001Sglebius * notice, this list of conditions and the following disclaimer 10290001Sglebius * in this position and unchanged. 11290001Sglebius * 2. Redistributions in binary form must reproduce the above copyright 12290001Sglebius * notice, this list of conditions and the following disclaimer in the 13290001Sglebius * documentation and/or other materials provided with the distribution. 14290001Sglebius * 3. The name of the author may not be used to endorse or promote products 15290001Sglebius * derived from this software without specific prior written permission. 16290001Sglebius * 17290001Sglebius * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18290001Sglebius * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19290001Sglebius * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2054359Sroberto * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 2154359Sroberto * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2254359Sroberto * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2354359Sroberto * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2454359Sroberto * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2554359Sroberto * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26290001Sglebius * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27290001Sglebius * 28290001Sglebius * from: FreeBSD: src/sys/alpha/include/ucontext.h,v 1.3 1999/10/08 29290001Sglebius * $FreeBSD: head/sys/sparc64/include/ucontext.h 295561 2016-02-12 07:38:19Z kib $ 30290001Sglebius */ 31290001Sglebius 32290001Sglebius#ifndef _MACHINE_UCONTEXT_H_ 3354359Sroberto#define _MACHINE_UCONTEXT_H_ 34290001Sglebius 35290001Sglebiusstruct __mcontext { 36290001Sglebius __uint64_t mc_global[8]; 37290001Sglebius __uint64_t mc_out[8]; 3854359Sroberto __uint64_t mc_local[8]; 3954359Sroberto __uint64_t mc_in[8]; 4054359Sroberto __uint32_t mc_fp[64]; 41290001Sglebius} __aligned(64); 42290001Sglebius 4354359Srobertotypedef struct __mcontext mcontext_t; 4454359Sroberto 4554359Sroberto#define _mc_flags mc_global[0] 4654359Sroberto#define _mc_sp mc_out[6] 4754359Sroberto#define _mc_fprs mc_local[0] 4854359Sroberto#define _mc_fsr mc_local[1] 4954359Sroberto#define _mc_gsr mc_local[2] 5054359Sroberto#define _mc_tnpc mc_in[0] 5154359Sroberto#define _mc_tpc mc_in[1] 5254359Sroberto#define _mc_tstate mc_in[2] 5354359Sroberto#define _mc_y mc_in[4] 5454359Sroberto#define _mc_wstate mc_in[5] 5554359Sroberto 5654359Sroberto#define _MC_VERSION_SHIFT 0 5754359Sroberto#define _MC_VERSION_BITS 32 5854359Sroberto#define _MC_VERSION 1L 59290001Sglebius 6054359Sroberto#define _MC_FLAGS_SHIFT 32 6154359Sroberto#define _MC_FLAGS_BITS 32 6254359Sroberto#define _MC_VOLUNTARY ((1L << 0) << _MC_FLAGS_SHIFT) 6354359Sroberto 6454359Sroberto#endif /* !_MACHINE_UCONTEXT_H_ */ 6554359Sroberto