add support for BINDER_SET_INHERIT_FIFO_PRIO ioctl
Test: works
bug 36516194
Change-Id: Ib23559026dfb741d4371197d3d3a8a0a726e3b9e
(cherry picked from commit 7847c447d36ab8c419b1693df841b18dcfa412df)
diff --git a/service.cpp b/service.cpp
index 755e463..2057851 100644
--- a/service.cpp
+++ b/service.cpp
@@ -101,8 +101,16 @@
IPCThreadState::self()->setTheContextObject(service);
// Then tell binder kernel
ioctl(binder_fd, BINDER_SET_CONTEXT_MGR, 0);
+ // Only enable FIFO inheritance for hwbinder
+ // FIXME: remove define when in the kernel
+#define BINDER_SET_INHERIT_FIFO_PRIO _IO('b', 10)
- int rc = property_set("hwservicemanager.ready", "true");
+ int rc = ioctl(binder_fd, BINDER_SET_INHERIT_FIFO_PRIO);
+ if (rc) {
+ ALOGE("BINDER_SET_INHERIT_FIFO_PRIO failed with error %d\n", rc);
+ }
+
+ rc = property_set("hwservicemanager.ready", "true");
if (rc) {
ALOGE("Failed to set \"hwservicemanager.ready\" (error %d). "\
"HAL services will not launch!\n", rc);