00001 /* vim: set sw=2: 00002 * Copyright (c) 2009, Gennady Bystritsky <bystr@mac.com> 00003 * 00004 * Distributed under the MIT Licence. 00005 * This is free software. See 'LICENSE' for details. 00006 * You must read and accept the license prior to use. 00007 * 00008 * Author: Gennady Bystritsky (gennady.bystritsky@quest.com) 00009 */ 00010 00011 #ifndef _SK_RT_LOCKER_HXX_ 00012 #define _SK_RT_LOCKER_HXX_ 00013 00014 #include <sk/util/Holder.hxx> 00015 #include <sk/rt/Lock.h> 00016 00017 namespace sk { 00018 namespace rt { 00047 template<typename L> 00048 class Locker 00049 { 00050 public: 00055 Locker(L& lock); 00062 ~Locker(); 00063 00064 private: 00065 sk::util::Holder<L, sk::util::slot::policy::Sharing<L> > _lockHolder; 00066 }; 00067 } 00068 } 00069 00070 #endif /* _SK_RT_LOCKER_HXX_ */