• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/core


Commit MetaInfo

修訂568089f28a635438d34e0073ea44ac08b32f56ab (tree)
時間2017-08-08 17:13:14
作者Christopher Ferris <cferris@goog...>
CommiterChih-Wei Huang

Log Message

Update for kernel headers v4.7.2.

The new uapi kernel headers added a new SEGV reason code, so
add it to the tombstone code.

Update sync.c to include the needed data structures itself. Someone
else will be fixing this to work on old versus new kernels.

Change-Id: Icb27713ea38a20003c7671a9bca262eebd96099b

Change Summary

差異

--- a/debuggerd/tombstone.cpp
+++ b/debuggerd/tombstone.cpp
@@ -131,8 +131,13 @@ static const char* get_sigcode(int signo, int code) {
131131 #if defined(SEGV_BNDERR)
132132 case SEGV_BNDERR: return "SEGV_BNDERR";
133133 #endif
134+#if defined(SEGV_PKUERR)
135+ case SEGV_PKUERR: return "SEGV_PKUERR";
136+#endif
134137 }
135-#if defined(SEGV_BNDERR)
138+#if defined(SEGV_PKUERR)
139+ static_assert(NSIGSEGV == SEGV_PKUERR, "missing SEGV_* si_code");
140+#elif defined(SEGV_BNDERR)
136141 static_assert(NSIGSEGV == SEGV_BNDERR, "missing SEGV_* si_code");
137142 #else
138143 static_assert(NSIGSEGV == SEGV_ACCERR, "missing SEGV_* si_code");
--- a/libsync/sync.c
+++ b/libsync/sync.c
@@ -21,13 +21,27 @@
2121 #include <stdint.h>
2222 #include <string.h>
2323
24-#include <linux/sync.h>
2524 #include <linux/sw_sync.h>
2625
2726 #include <sys/ioctl.h>
2827 #include <sys/stat.h>
2928 #include <sys/types.h>
3029
30+#include <sync/sync.h>
31+
32+// The sync code is undergoing a major change. Add enough in to get
33+// everything to compile wih the latest uapi headers.
34+struct sync_merge_data {
35+ int32_t fd2;
36+ char name[32];
37+ int32_t fence;
38+};
39+
40+#define SYNC_IOC_MAGIC '>'
41+#define SYNC_IOC_WAIT _IOW(SYNC_IOC_MAGIC, 0, __s32)
42+#define SYNC_IOC_MERGE _IOWR(SYNC_IOC_MAGIC, 1, struct sync_merge_data)
43+#define SYNC_IOC_FENCE_INFO _IOWR(SYNC_IOC_MAGIC, 2, struct sync_fence_info_data)
44+
3145 int sync_wait(int fd, int timeout)
3246 {
3347 __s32 to = timeout;