diff options
author | Christopher Ferris <cferris@google.com> | 2013-10-29 15:44:25 -0700 |
---|---|---|
committer | Christopher Ferris <cferris@google.com> | 2013-10-30 14:14:54 -0700 |
commit | 8ed46278bee3cfc4c216f3a1524744019b693200 (patch) | |
tree | 5f6eab2ef98469e75dc1d1793b134ee61715cac5 /libbacktrace/BacktraceThread.h | |
parent | 98f87d92d89079f274374409efcf57ca52b13c1f (diff) | |
download | system_core-8ed46278bee3cfc4c216f3a1524744019b693200.zip system_core-8ed46278bee3cfc4c216f3a1524744019b693200.tar.gz system_core-8ed46278bee3cfc4c216f3a1524744019b693200.tar.bz2 |
More libbacktrace fixes.
Included in minor fix ups is the addition of a warning macro to replace
all of the ALOGW calls.
Fix a race where multiple threads could be attempting to unwind the threads
of the current process at the same time.
Bug: 8410085
Change-Id: I02a65dc778dde690e5f95fc8ff069a32d0832fd1
Diffstat (limited to 'libbacktrace/BacktraceThread.h')
-rw-r--r-- | libbacktrace/BacktraceThread.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/libbacktrace/BacktraceThread.h b/libbacktrace/BacktraceThread.h index afea771..8ed1122 100644 --- a/libbacktrace/BacktraceThread.h +++ b/libbacktrace/BacktraceThread.h @@ -32,26 +32,25 @@ typedef enum { class BacktraceThreadInterface; -class ThreadEntry { -public: +struct ThreadEntry { ThreadEntry( BacktraceThreadInterface* impl, pid_t pid, pid_t tid, size_t num_ignore_frames); ~ThreadEntry(); - bool Match(pid_t pid, pid_t tid) { return (pid == pid_ && tid == tid_); } + bool Match(pid_t chk_pid, pid_t chk_tid) { return (chk_pid == pid && chk_tid == tid); } static ThreadEntry* AddThreadToUnwind( BacktraceThreadInterface* thread_intf, pid_t pid, pid_t tid, size_t num_ignored_frames); - BacktraceThreadInterface* thread_intf_; - pid_t pid_; - pid_t tid_; - ThreadEntry* next_; - ThreadEntry* prev_; - int32_t state_; - int num_ignore_frames_; + BacktraceThreadInterface* thread_intf; + pid_t pid; + pid_t tid; + ThreadEntry* next; + ThreadEntry* prev; + int32_t state; + int num_ignore_frames; }; // Interface class that does not contain any local storage, only defines |