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

Side by Side Diff: src/platform-linux.cc

Issue 9298016: MIPS: Add signal context definitions for use with Android. (2nd try) (Closed)
Patch Set: Created 8 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after
937 typedef struct sigcontext mcontext_t; 937 typedef struct sigcontext mcontext_t;
938 typedef struct ucontext { 938 typedef struct ucontext {
939 uint32_t uc_flags; 939 uint32_t uc_flags;
940 struct ucontext* uc_link; 940 struct ucontext* uc_link;
941 stack_t uc_stack; 941 stack_t uc_stack;
942 mcontext_t uc_mcontext; 942 mcontext_t uc_mcontext;
943 __sigset_t uc_sigmask; 943 __sigset_t uc_sigmask;
944 } ucontext_t; 944 } ucontext_t;
945 enum ArmRegisters {R15 = 15, R13 = 13, R11 = 11}; 945 enum ArmRegisters {R15 = 15, R13 = 13, R11 = 11};
946 946
947 #elif !defined(__GLIBC__) && defined(__mips__)
948 // MIPS version of sigcontext, for Android bionic.
949 struct sigcontext {
950 uint32_t regmask;
951 uint32_t status;
952 uint64_t pc;
953 uint64_t gregs[32];
954 uint64_t fpregs[32];
955 uint32_t acx;
956 uint32_t fpc_csr;
957 uint32_t fpc_eir;
958 uint32_t used_math;
959 uint32_t dsp;
960 uint64_t mdhi;
961 uint64_t mdlo;
962 uint32_t hi1;
963 uint32_t lo1;
964 uint32_t hi2;
965 uint32_t lo2;
966 uint32_t hi3;
967 uint32_t lo3;
968 };
969 typedef uint32_t __sigset_t;
970 typedef struct sigcontext mcontext_t;
971 typedef struct ucontext {
972 uint32_t uc_flags;
973 struct ucontext* uc_link;
974 stack_t uc_stack;
975 mcontext_t uc_mcontext;
976 __sigset_t uc_sigmask;
977 } ucontext_t;
978
947 #endif 979 #endif
948 980
949 981
950 static int GetThreadID() { 982 static int GetThreadID() {
951 // Glibc doesn't provide a wrapper for gettid(2). 983 // Glibc doesn't provide a wrapper for gettid(2).
952 #if defined(ANDROID) 984 #if defined(ANDROID)
953 return syscall(__NR_gettid); 985 return syscall(__NR_gettid);
954 #else 986 #else
955 return syscall(SYS_gettid); 987 return syscall(SYS_gettid);
956 #endif 988 #endif
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1208 1240
1209 1241
1210 void Sampler::Stop() { 1242 void Sampler::Stop() {
1211 ASSERT(IsActive()); 1243 ASSERT(IsActive());
1212 SignalSender::RemoveActiveSampler(this); 1244 SignalSender::RemoveActiveSampler(this);
1213 SetActive(false); 1245 SetActive(false);
1214 } 1246 }
1215 1247
1216 1248
1217 } } // namespace v8::internal 1249 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698