]> www.infradead.org Git - users/jedix/linux-maple.git/commit
llist: Return whether list is empty before adding in llist_add()
authorHuang Ying <ying.huang@intel.com>
Thu, 8 Sep 2011 06:00:45 +0000 (14:00 +0800)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 5 Dec 2012 16:59:12 +0000 (11:59 -0500)
commitbefc2ad21adf273f39f5de4479d7a2df39659f35
tree9215372afa67f418d86fc4f70b2a76f08b823c6c
parente84c4879898cb0a1864a6b09b1f4b619949e1c65
llist: Return whether list is empty before adding in llist_add()

Extend the llist_add*() functions to return a success indicator, this
allows us in the scheduler code to send an IPI if the queue was empty.

( There's no effect on existing users, because the list_add_xxx() functions
  are inline, thus this will be optimized out by the compiler if not used
  by callers. )

Signed-off-by: Huang Ying <ying.huang@intel.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1315461646-1379-5-git-send-email-ying.huang@intel.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
(cherry picked from commit 781f7fd916fc77a862e20063ed3aeedf173234f9)
include/linux/llist.h
lib/llist.c