aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRiley Andrews <riandrews@google.com>2014-09-26 17:36:36 -0700
committerDaniel Rosenberg <drosen@google.com>2015-01-12 16:49:35 -0800
commit5d869df4d5b6742463f27baec25b816c19980a55 (patch)
treef574083f03c637cd8b801876d4e04b84477d9bd5 /drivers
parentcc73eaffcaea05627cd20c1bdbfc05d2dc97f1b2 (diff)
staging: binder: Change binder mutex to rtmutex.
Surfaceflinger uses binder heavily to receive/send frames from applications while compositing the screen. Change the binder mutex to an rt mutex to minimize instances where high priority surfaceflinger binder work is blocked by lower priority binder ipc. Signed-off-by: Riley Andrews <riandrews@google.com> Change-Id: I086a715267648448f0c5f62b037a3093d1079a79
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/android/binder.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index f66abb0c8943..6f116e48b6ef 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -26,6 +26,7 @@
#include <linux/miscdevice.h>
#include <linux/mm.h>
#include <linux/module.h>
+#include <linux/rtmutex.h>
#include <linux/mutex.h>
#include <linux/nsproxy.h>
#include <linux/poll.h>
@@ -42,7 +43,7 @@
#include "binder.h"
#include "binder_trace.h"
-static DEFINE_MUTEX(binder_main_lock);
+static DEFINE_RT_MUTEX(binder_main_lock);
static DEFINE_MUTEX(binder_deferred_lock);
static DEFINE_MUTEX(binder_mmap_lock);
@@ -420,14 +421,14 @@ static long task_close_fd(struct binder_proc *proc, unsigned int fd)
static inline void binder_lock(const char *tag)
{
trace_binder_lock(tag);
- mutex_lock(&binder_main_lock);
+ rt_mutex_lock(&binder_main_lock);
trace_binder_locked(tag);
}
static inline void binder_unlock(const char *tag)
{
trace_binder_unlock(tag);
- mutex_unlock(&binder_main_lock);
+ rt_mutex_unlock(&binder_main_lock);
}
static void binder_set_nice(long nice)