]> rtime.felk.cvut.cz Git - l4.git/blobdiff - kernel/fiasco/src/types/types.h
update
[l4.git] / kernel / fiasco / src / types / types.h
index 6b30167ccb8f12184f8844f6d647e62931e16302..0fd244e6ae43160dad770b15394dfdbf834f37ee 100644 (file)
@@ -15,6 +15,10 @@ a nonull_static_cast( b p )
   return reinterpret_cast<a>( reinterpret_cast<Address>(p) + d);
 }
 
+template< typename T >
+T access_once(T const &a)
+{ return static_cast<T const volatile &>(a); }
+
 template< typename T >
 class Static_object
 {
@@ -77,6 +81,7 @@ public:
   { _v = o._v; return *static_cast<Target*>(this); }
 
   Value value() const { return _v; }
+  Value value() const volatile { return _v; }
   void set_value(Value v) { _v = v; }
 
   bool operator < (Target const &o) const { return _v < o._v; }
@@ -161,6 +166,10 @@ public:
 
   explicit Page_addr(Address a) : B(a) {}
 
+  Page_addr(Page_addr const volatile &o) : B(o.value()) {}
+  Page_addr(Page_addr const &o) : B(o.value()) {}
+
+
   Page_addr() {}