/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2015 Nexenta Systems, Inc. All rights reserved.
*
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#ifndef _SYS_UCONTEXT_H
#define _SYS_UCONTEXT_H
#include <sys/feature_tests.h>
#include <sys/mcontext.h>
#if !defined(_XPG4_2) || defined(__EXTENSIONS__)
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* breaks XPG4v2 namespace. Therefore we must duplicate the defines
* for these types here when _XPG4_2 is defined.
*/
#if defined(_XPG4_2) && !defined(__EXTENSIONS__)
#ifndef _SIGSET_T
#define _SIGSET_T
typedef struct { /* signal set type */
} sigset_t;
#endif /* _SIGSET_T */
#ifndef _STACK_T
#define _STACK_T
typedef struct {
void *ss_sp;
int ss_flags;
} stack_t;
#endif /* _STACK_T */
#endif /* defined(_XPG4_2) && !defined(__EXTENSIONS__) */
#if !defined(_XPG4_2) || defined(__EXTENSIONS__)
#else
#endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
#if !defined(_XPG4_2) || defined(__EXTENSIONS__)
struct ucontext {
#else
struct __ucontext {
#endif
#ifdef __sparcv9
#else /* __sparcv9 */
#endif /* __sparcv9 */
};
#ifdef _SYSCALL32
/* Kernel view of user ILP32 ucontext structure */
typedef struct ucontext32 {
} ucontext32_t;
#ifdef _KERNEL
#endif
#endif /* _SYSCALL32 */
#if !defined(_XPG4_2) || defined(__EXTENSIONS__)
#define GETCONTEXT 0
/*
* values for uc_flags
* these are implementation dependent flags, that should be hidden
* from the user interface, defining which elements of ucontext
* are valid, and should be restored on call to setcontext
*/
/*
* UC_ALL specifies the default context
*/
#endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
#ifdef _KERNEL
extern void restorecontext(ucontext_t *);
#ifdef _SYSCALL32
#endif
#endif
#ifdef __cplusplus
}
#endif
#endif /* _SYS_UCONTEXT_H */