tools/profiler/android-signal-defs.h
author Daniel Holbert <dholbert@cs.stanford.edu>
Mon, 04 Feb 2013 08:17:31 -0800
changeset 120772 b40b5c2a7592cb44717b5dd199ac9c6bacfe0677
parent 112710 ec3ad127d56794c1c7ae88ee4dc6b0b3ee3b8e96
child 128556 ee95ad865eab29e1a4fd5903bee1d9fb9edf6389
permissions -rw-r--r--
Bug 836957 part 3: Mark remaining nsIFrame::GetSkipSides() overrides as MOZ_OVERRIDE, and remove stale comments. r=mats

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

// Android runs a fairly new Linux kernel, so signal info is there,
// but the C library doesn't have the structs defined.

// All NDK platform versions have asm/sigcontext.h for ARM
// Only NDK >= 6, platform >= 9 have asm/sigcontext.h for x86
// Only NDK >= 8, platform >= 9 have asm/sigcontext.h for MIPS
#if defined(__arm__) || defined(__thumb__) || ANDROID_VERSION >= 9
#include <asm/sigcontext.h>
#else
#error use newer NDK or newer platform version (e.g. --with-android-version=9)
#endif

#ifndef __BIONIC_HAVE_UCONTEXT_T
typedef uint32_t __sigset_t;
typedef struct sigcontext mcontext_t;
typedef struct ucontext {
  uint32_t uc_flags;
  struct ucontext* uc_link;
  stack_t uc_stack;
  mcontext_t uc_mcontext;
  __sigset_t uc_sigmask;
} ucontext_t;
#endif