#include <XrdOssCsiRanges.hh>
Definition at line 100 of file XrdOssCsiRanges.hh.
◆ XrdOssCsiRanges()
XrdOssCsiRanges::XrdOssCsiRanges |
( |
| ) |
|
|
inline |
◆ ~XrdOssCsiRanges()
XrdOssCsiRanges::~XrdOssCsiRanges |
( |
| ) |
|
|
inline |
Definition at line 105 of file XrdOssCsiRanges.hh.
106 {
107 XrdOssCsiRange_s *p;
108 while((p = allocList_))
109 {
110 allocList_ = allocList_->next;
111 delete p;
112 }
113 }
◆ AddRange()
void XrdOssCsiRanges::AddRange |
( |
const off_t | start, |
|
|
const off_t | end, |
|
|
XrdOssCsiRangeGuard & | rg, |
|
|
bool | rdonly ) |
|
inline |
◆ RemoveRange()
Definition at line 154 of file XrdOssCsiRanges.hh.
155 {
156 std::lock_guard<std::mutex> guard(rmtx_);
157 for(auto itr=ranges_.begin();itr!=ranges_.end();++itr)
158 {
159 if (*itr == rp)
160 {
161 ranges_.erase(itr);
162 break;
163 }
164 }
165
166 for(auto itr=ranges_.begin(); itr != ranges_.end(); ++itr)
167 {
168 if ((*itr)->start <= rp->
end && rp->
start <= (*itr)->end)
169 {
170 if (!(rp->
rdonly && (*itr)->rdonly))
171 {
172 std::unique_lock<std::mutex> l((*itr)->mtx);
173 (*itr)->nBlockedBy--;
174 if ((*itr)->nBlockedBy == 0)
175 {
176 (*itr)->cv.notify_one();
177 }
178 }
179 }
180 }
181
182 RecycleRange(rp);
183 rp = NULL;
184 }
References XrdOssCsiRange_s::end, XrdOssCsiRange_s::rdonly, and XrdOssCsiRange_s::start.
◆ Wait()
The documentation for this class was generated from the following file: