lkml.org 
[lkml]   [2006]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [patch] RCU: add comments to rcu_pending/rcu_needs_cpu
On Thu, Apr 27, 2006 at 10:11:56AM +0200, Heiko Carstens wrote:
> From: Heiko Carstens <heiko.carstens@de.ibm.com>
>
> Add some comments to rcu_pending() and rcu_needs_cpu().
>
> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
> ---
>
> Wording might be poor, but probably better than no comments at all.

But these are internal interfaces for RCU, so doesn't seem like they
should go into docbook. Quite different than (say) rcu_read_lock()
or call_rcu().

How about something like the following instead?

Thanx, Paul

Signed-off-by: <paulmck@us.ibm.com>
---

diff -urpNa -X dontdiff linux-2.6.17-rc3-rnc/kernel/rcupdate.c linux-2.6.17-rc3-rnc.pem/kernel/rcupdate.c
--- linux-2.6.17-rc3-rnc/kernel/rcupdate.c 2006-05-01 14:42:30.000000000 -0700
+++ linux-2.6.17-rc3-rnc.pem/kernel/rcupdate.c 2006-05-01 14:48:19.000000000 -0700
@@ -479,12 +479,25 @@ static int __rcu_pending(struct rcu_ctrl
return 0;
}

+/*
+ * Check to see if there is any immediate RCU-related work to be done
+ * by the current CPU, returning 1 if so. This function is part of the
+ * RCU implementation; it is -not- an exported member of the RCU API.
+ */
+
int rcu_pending(int cpu)
{
return __rcu_pending(&rcu_ctrlblk, &per_cpu(rcu_data, cpu)) ||
__rcu_pending(&rcu_bh_ctrlblk, &per_cpu(rcu_bh_data, cpu));
}

+/*
+ * Check to see if any future RCU-related work will need to be done
+ * by the current CPU, even if none need be done immediately, returning
+ * 1 if so. This function is part of the RCU implementation; it is -not-
+ * an exported member of the RCU API.
+ */
+
int rcu_needs_cpu(int cpu)
{
struct rcu_data *rdp = &per_cpu(rcu_data, cpu);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-05-01 23:59    [W:0.073 / U:0.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site