path: root/sys/sys/_rmlock.h
diff options
authorAttilio Rao <attilio@FreeBSD.org>2012-09-18 00:43:15 +0000
committerAttilio Rao <attilio@FreeBSD.org>2012-09-18 00:43:15 +0000
commit6a612df12c9a754f4edbdbfe06b8a91237e451b5 (patch)
tree2dc46c4f4ca9ef2ec8d826583b3a98946f511950 /sys/sys/_rmlock.h
parentd94f2d7f34a9aa67f9750ff9fe219471404a6bae (diff)
Remove namespace pollution in _rmlock.h by defining rm_queue structure
directly in _rmlock.h and then including it (and its dependencies) in pcpu.h. This leads to few _*.h headers to be included in pcpu.h but this is not considered a big deal. Really pc_rm_queue should be implemented as a dynamic member with DPCPU interface, but we really want to keep the read acquisition as fast as possible, so even the further pc_dynamic indirection should be avoided, and the pollution is dealt like this. Discussed with: jhb MFC after: 1 week
Notes: svn path=/head/; revision=240624
Diffstat (limited to 'sys/sys/_rmlock.h')
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/sys/_rmlock.h b/sys/sys/_rmlock.h
index 15d6c4953e85..09a59e03cf9b 100644
--- a/sys/sys/_rmlock.h
+++ b/sys/sys/_rmlock.h
@@ -32,17 +32,17 @@
#ifndef _SYS__RMLOCK_H_
#define _SYS__RMLOCK_H_
- * XXXUPS remove as soon as we have per cpu variable
- * linker sets and can define rm_queue in _rm_lock.h
-#include <sys/pcpu.h>
* Mostly reader/occasional writer lock.
+struct rm_queue {
+ struct rm_queue *volatile rmq_next;
+ struct rm_queue *volatile rmq_prev;
struct rmlock {
struct lock_object lock_object;
volatile cpuset_t rm_writecpus;