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

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

Issue 9298003: MIPS: Add signal context definitions for use with Android. (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 struct sigcontext {
949 unsigned int regmask;
950 unsigned int status;
951 unsigned long long pc;
952 unsigned long long gregs[32];
953 unsigned long long fpregs[32];
954 unsigned int acx;
955 unsigned int fpc_csr;
956 unsigned int fpc_eir;
957 unsigned int used_math;
958 unsigned int dsp;
959 unsigned long long mdhi;
960 unsigned long long mdlo;
961 unsigned long hi1;
962 unsigned long lo1;
963 unsigned long hi2;
964 unsigned long lo2;
965 unsigned long hi3;
966 unsigned long lo3;
967 };
968 typedef uint32_t __sigset_t;
969 typedef struct sigcontext mcontext_t;
970 typedef struct ucontext {
971 uint32_t uc_flags;
972 struct ucontext* uc_link;
973 stack_t uc_stack;
974 mcontext_t uc_mcontext;
975 __sigset_t uc_sigmask;
976 } ucontext_t;
977
947 #endif 978 #endif
948 979
949 980
950 static int GetThreadID() { 981 static int GetThreadID() {
951 // Glibc doesn't provide a wrapper for gettid(2). 982 // Glibc doesn't provide a wrapper for gettid(2).
952 #if defined(ANDROID) 983 #if defined(ANDROID)
953 return syscall(__NR_gettid); 984 return syscall(__NR_gettid);
954 #else 985 #else
955 return syscall(SYS_gettid); 986 return syscall(SYS_gettid);
956 #endif 987 #endif
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1208 1239
1209 1240
1210 void Sampler::Stop() { 1241 void Sampler::Stop() {
1211 ASSERT(IsActive()); 1242 ASSERT(IsActive());
1212 SignalSender::RemoveActiveSampler(this); 1243 SignalSender::RemoveActiveSampler(this);
1213 SetActive(false); 1244 SetActive(false);
1214 } 1245 }
1215 1246
1216 1247
1217 } } // namespace v8::internal 1248 } } // 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