summaryrefslogtreecommitdiff
path: root/kern/llsync_i.h
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2013-05-24 00:03:20 +0200
committerRichard Braun <rbraun@sceen.net>2013-05-24 00:03:20 +0200
commit809082a3520480925def38e10272440ef68a455b (patch)
tree24e7721d0fd72c0e313aa4b4ac413f2cf47137a5 /kern/llsync_i.h
parentb6b7c519edefe21b43e816f7e6d48fdb70f1eb8d (diff)
kern/llsync: improve concurrency
Keep a local copy of a processor registration state to avoid acquiring the global lock when attempting to commit a checkpoint from an unregistered processor.
Diffstat (limited to 'kern/llsync_i.h')
-rw-r--r--kern/llsync_i.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/kern/llsync_i.h b/kern/llsync_i.h
index 89a7fe83..034e368b 100644
--- a/kern/llsync_i.h
+++ b/kern/llsync_i.h
@@ -21,12 +21,13 @@
#include <kern/param.h>
/*
- * Per-processor flag indicating if a processor checked in.
+ * Per-processor data.
*/
-struct llsync_cpu_checkpoint {
+struct llsync_cpu {
+ int registered;
int checked;
} __aligned(CPU_L1_SIZE);
-extern struct llsync_cpu_checkpoint llsync_cpu_checkpoints[MAX_CPUS];
+extern struct llsync_cpu llsync_cpus[MAX_CPUS];
#endif /* _KERN_LLSYNC_I_H */