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>
70 template <
typename Type>
78 template <
typename Type>
85 template <
typename Type>
91 template <
typename Type>
95 rwlock_->lock_for_read();
99 template <
typename Type>
103 rwlock_->lock_for_write();
109 template <
typename Type>
113 return rwlock_->try_lock_for_read();
119 template <
typename Type>
123 return rwlock_->try_lock_for_write();
127 template <
typename Type>
131 return rwlock_->unlock();
137 template <
typename Type>
141 rwlock_->lock_for_write();
142 std::list<Type>::push_back(x);
149 template <
typename Type>
153 rwlock_->lock_for_write();
154 std::list<Type>::push_front(x);
161 template <
typename Type>
165 rwlock_->lock_for_write();
166 std::list<Type>::remove(x);
173 template <
typename Type>
186 template <
typename Type>
190 rwlock_->lock_for_write();
194 for (i = ll.begin(); i != ll.end(); ++i) {
209 template <
typename Type>
213 rwlock_->lock_for_write();
215 typename std::list<Type>::const_iterator i;
216 for (i = l.begin(); i != l.end(); ++i) {