1// Copyright 2014 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#ifndef SANDBOX_LINUX_SERVICES_ANDROID_MIPS_UCONTEXT_H_ 6#define SANDBOX_LINUX_SERVICES_ANDROID_MIPS_UCONTEXT_H_ 7 8// This is mostly copied from breakpad (common/android/include/sys/ucontext.h), 9// except we do use sigset_t for uc_sigmask instead of a custom type. 10#if !defined(__BIONIC_HAVE_UCONTEXT_T) 11// Ensure that 'stack_t' is defined. 12#include <asm/signal.h> 13 14// We also need greg_t for the sandbox, include it in this header as well. 15typedef unsigned long greg_t; 16 17typedef struct { 18 uint32_t regmask; 19 uint32_t status; 20 uint64_t pc; 21 uint64_t gregs[32]; 22 uint64_t fpregs[32]; 23 uint32_t acx; 24 uint32_t fpc_csr; 25 uint32_t fpc_eir; 26 uint32_t used_math; 27 uint32_t dsp; 28 uint64_t mdhi; 29 uint64_t mdlo; 30 uint32_t hi1; 31 uint32_t lo1; 32 uint32_t hi2; 33 uint32_t lo2; 34 uint32_t hi3; 35 uint32_t lo3; 36} mcontext_t; 37 38typedef struct ucontext { 39 uint32_t uc_flags; 40 struct ucontext* uc_link; 41 stack_t uc_stack; 42 mcontext_t uc_mcontext; 43 sigset_t uc_sigmask; 44 // Other fields are not used by Google Breakpad. Don't define them. 45} ucontext_t; 46 47#else 48#include <sys/ucontext.h> 49#endif // __BIONIC_HAVE_UCONTEXT_T 50 51#endif // SANDBOX_LINUX_SERVICES_ANDROID_MIPS_UCONTEXT_H_ 52