Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(665)

Unified Diff: src/platform-linux.cc

Issue 10105026: Version 3.10.3 (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/platform-freebsd.cc ('k') | src/platform-macos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform-linux.cc
===================================================================
--- src/platform-linux.cc (revision 11348)
+++ src/platform-linux.cc (working copy)
@@ -964,6 +964,46 @@
__sigset_t uc_sigmask;
} ucontext_t;
+#elif !defined(__GLIBC__) && defined(__i386__)
+// x86 version for Android.
+struct _libc_fpreg {
+ uint16_t significand[4];
+ uint16_t exponent;
+};
+
+struct _libc_fpstate {
+ uint64_t cw;
+ uint64_t sw;
+ uint64_t tag;
+ uint64_t ipoff;
+ uint64_t cssel;
+ uint64_t dataoff;
+ uint64_t datasel;
+ struct _libc_fpreg _st[8];
+ uint64_t status;
+};
+
+typedef struct _libc_fpstate *fpregset_t;
+
+typedef struct mcontext {
+ int32_t gregs[19];
+ fpregset_t fpregs;
+ int64_t oldmask;
+ int64_t cr2;
+} mcontext_t;
+
+typedef uint64_t __sigset_t;
+
+typedef struct ucontext {
+ uint64_t uc_flags;
+ struct ucontext *uc_link;
+ stack_t uc_stack;
+ mcontext_t uc_mcontext;
+ __sigset_t uc_sigmask;
+ struct _libc_fpstate __fpregs_mem;
+} ucontext_t;
+
+enum { REG_EBP = 6, REG_ESP = 7, REG_EIP = 14 };
#endif
@@ -1055,11 +1095,8 @@
vm_tgid_(getpid()),
interval_(interval) {}
- static void SetUp() {
- if (!mutex_) {
- mutex_ = OS::CreateMutex();
- }
- }
+ static void SetUp() { if (!mutex_) mutex_ = OS::CreateMutex(); }
+ static void TearDown() { delete mutex_; }
static void InstallSignalHandler() {
struct sigaction sa;
@@ -1238,6 +1275,12 @@
}
+void OS::TearDown() {
+ SignalSender::TearDown();
+ delete limit_mutex;
+}
+
+
Sampler::Sampler(Isolate* isolate, int interval)
: isolate_(isolate),
interval_(interval),
« no previous file with comments | « src/platform-freebsd.cc ('k') | src/platform-macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698