ipc/sem: explicitly inline check_restart
PATCH 54/114 ipc/sem: explicitly inline check_restart
From: Davidlohr Bueso <[email protected]>
Subject: ipc/sem: explicitly inline check_restart
The compiler already does this, but make it explicit. This helper is really small and also used in update_queue's main loop, which is O(N^2) scanning. Inline and avoid the function overhead.
Signed-off-by Davidlohr Bueso <[email protected]>
Cc Manfred Spraul <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
ipc/sem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
ipc/sem.c renamed from ipc/sem.c~ipc-sem-explicitly-inline-check_restart +1 -1
@@ -772,7 +772,7 @@ static void unlink_queue(struct sem_arra* modified the array. * Note that wait-for-zero operations are handled without restart. */ -static int check_restart (struct sem_array *sma,struct sem_queue *q) +static inline int check_restart (struct sem_array *sma,struct sem_queue *q) {/* pending complex alter operations are too difficult to analyse */ if (!list_empty (&sma->pending_alter))
_