Add support for building the Linux client code using the Android NDK

r=mwu at http://breakpad.appspot.com/212001/show

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@716 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
ted.mielczarek 2010-10-20 15:51:38 +00:00
parent 9c30407f7f
commit cfc8628092
15 changed files with 248 additions and 26 deletions

View file

@ -37,6 +37,8 @@
#include <sys/syscall.h>
#include <unistd.h>
#include "third_party/lss/linux_syscall_support.h"
#if defined(__ARM_EABI__)
#define TID_PTR_REGISTER "r3"
#elif defined(__i386)
@ -48,7 +50,7 @@
#endif
void *thread_function(void *data) {
volatile pid_t thread_id = syscall(SYS_gettid);
volatile pid_t thread_id = syscall(__NR_gettid);
register volatile pid_t *thread_id_ptr asm(TID_PTR_REGISTER) = &thread_id;
while (true)
asm volatile ("" : : "r" (thread_id_ptr));