From 6a612df12c9a754f4edbdbfe06b8a91237e451b5 Mon Sep 17 00:00:00 2001 From: Attilio Rao Date: Tue, 18 Sep 2012 00:43:15 +0000 Subject: 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 --- sys/sys/_rmlock.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sys/sys/_rmlock.h') 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 /* * Mostly reader/occasional writer lock. */ LIST_HEAD(rmpriolist,rm_priotracker); +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; -- cgit v1.2.3