24 #ifndef __CORE_UTILS_RWLOCK_LIST_H_
25 #define __CORE_UTILS_RWLOCK_LIST_H_
27 #include <core/threading/read_write_lock.h>
28 #include <core/utils/refptr.h>
34 template <
typename Type>
72 template <
typename Type>
81 template <
typename Type>
88 template <
typename Type>
94 template <
typename Type>
98 __rwlock->lock_for_read();
103 template <
typename Type>
107 __rwlock->lock_for_write();
114 template <
typename Type>
118 return __rwlock->try_lock_for_read();
125 template <
typename Type>
129 return __rwlock->try_lock_for_write();
134 template <
typename Type>
138 return __rwlock->unlock();
145 template <
typename Type>
149 __rwlock->lock_for_write();
150 std::list<Type>::push_back(x);
158 template <
typename Type>
162 __rwlock->lock_for_write();
163 std::list<Type>::push_front(x);
171 template <
typename Type>
175 __rwlock->lock_for_write();
176 std::list<Type>::remove(x);
184 template <
typename Type>
198 template <
typename Type>
202 __rwlock->lock_for_write();
206 for (i = ll.begin(); i != ll.end(); ++i) {
222 template <
typename Type>
226 __rwlock->lock_for_write();
228 typename std::list<Type>::const_iterator i;
229 for (i = l.begin(); i != l.end(); ++i) {