summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2013-05-24 20:33:25 +0200
committerRichard Braun <rbraun@sceen.net>2013-05-24 20:33:25 +0200
commit02dee35e91a3d62c77d9affb61308c0ad4597c73 (patch)
tree2251f2215a5344772cebb307ac58167d2900931c
parent2587e7386bf87c79da9dd804e082079fbe16f0a6 (diff)
kern/llsync: group related functions
This minor change groups the reset/commit and register/unregister functions together for better discoverability.
-rw-r--r--kern/llsync.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/kern/llsync.c b/kern/llsync.c
index f6862da7..909b2661 100644
--- a/kern/llsync.c
+++ b/kern/llsync.c
@@ -208,6 +208,23 @@ llsync_process_global_checkpoint(unsigned int cpu)
llsync_wakeup_worker();
}
+static void
+llsync_commit_checkpoint_common(unsigned int cpu)
+{
+ int pending;
+
+ pending = bitmap_test(llsync_pending_checkpoints, cpu);
+
+ if (!pending)
+ return;
+
+ bitmap_clear(llsync_pending_checkpoints, cpu);
+ llsync_nr_pending_checkpoints--;
+
+ if (llsync_nr_pending_checkpoints == 0)
+ llsync_process_global_checkpoint(cpu);
+}
+
void
llsync_register_cpu(unsigned int cpu)
{
@@ -231,23 +248,6 @@ llsync_register_cpu(unsigned int cpu)
spinlock_unlock_intr_restore(&llsync_lock, flags);
}
-static void
-llsync_commit_checkpoint_common(unsigned int cpu)
-{
- int pending;
-
- pending = bitmap_test(llsync_pending_checkpoints, cpu);
-
- if (!pending)
- return;
-
- bitmap_clear(llsync_pending_checkpoints, cpu);
- llsync_nr_pending_checkpoints--;
-
- if (llsync_nr_pending_checkpoints == 0)
- llsync_process_global_checkpoint(cpu);
-}
-
void
llsync_unregister_cpu(unsigned int cpu)
{