diff options
Diffstat (limited to 'kernel/srcu.c')
-rw-r--r-- | kernel/srcu.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/kernel/srcu.c b/kernel/srcu.c index 7cf5baba96f9..f098f1768215 100644 --- a/kernel/srcu.c +++ b/kernel/srcu.c | |||
@@ -450,10 +450,12 @@ static void __synchronize_srcu(struct srcu_struct *sp, int trycount) | |||
450 | * synchronize_srcu - wait for prior SRCU read-side critical-section completion | 450 | * synchronize_srcu - wait for prior SRCU read-side critical-section completion |
451 | * @sp: srcu_struct with which to synchronize. | 451 | * @sp: srcu_struct with which to synchronize. |
452 | * | 452 | * |
453 | * Flip the completed counter, and wait for the old count to drain to zero. | 453 | * Wait for the count to drain to zero of both indexes. To avoid the |
454 | * As with classic RCU, the updater must use some separate means of | 454 | * possible starvation of synchronize_srcu(), it waits for the count of |
455 | * synchronizing concurrent updates. Can block; must be called from | 455 | * the index=((->completed & 1) ^ 1) to drain to zero at first, |
456 | * process context. | 456 | * and then flip the completed and wait for the count of the other index. |
457 | * | ||
458 | * Can block; must be called from process context. | ||
457 | * | 459 | * |
458 | * Note that it is illegal to call synchronize_srcu() from the corresponding | 460 | * Note that it is illegal to call synchronize_srcu() from the corresponding |
459 | * SRCU read-side critical section; doing so will result in deadlock. | 461 | * SRCU read-side critical section; doing so will result in deadlock. |