From e86d71b7b4653ddd66db7f3a16074e46ed24848f Mon Sep 17 00:00:00 2001 From: Milind Changire Date: Wed, 18 Oct 2017 10:10:38 +0530 Subject: rpc: make actor search parallel Problem: On a service request, the actor is searched using an exclusive mutex lock which is not really necessary since most of the time the actor list is going to be searched and not modified. Solution: Use a read-write lock instead of a mutex lock. Only modify operations on a service need to be done under a write-lock which grants exclusive access to the code. Change-Id: Ia227351b3f794bd8eee70c7a76d833cc716ab113 BUG: 1509644 Signed-off-by: Milind Changire --- rpc/rpc-lib/src/rpcsvc-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rpc/rpc-lib/src/rpcsvc-common.h') diff --git a/rpc/rpc-lib/src/rpcsvc-common.h b/rpc/rpc-lib/src/rpcsvc-common.h index dd958032336..ab715d3417e 100644 --- a/rpc/rpc-lib/src/rpcsvc-common.h +++ b/rpc/rpc-lib/src/rpcsvc-common.h @@ -42,7 +42,7 @@ typedef struct rpcsvc_state { * other options. */ - pthread_mutex_t rpclock; + pthread_rwlock_t rpclock; unsigned int memfactor; -- cgit