Re: [patch] RCU: add comments to rcu_pending/rcu_needs_cpu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 27, 2006 at 10:11:56AM +0200, Heiko Carstens wrote:
> From: Heiko Carstens <[email protected]>
> 
> Add some comments to rcu_pending() and rcu_needs_cpu().
> 
> Signed-off-by: Heiko Carstens <[email protected]>
> ---
> 
> 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: <[email protected]>
---

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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux