| 273 | |
| 274 | |
| 275 | comm::RetCode SyncCtrl::ClearCursorID(const int sub_id, const int queue_id) { |
| 276 | auto opt = impl_->store->GetStoreOption(); |
| 277 | |
| 278 | if (!sub_id || sub_id > opt->nsub || queue_id >= opt->nqueue) |
| 279 | return comm::RetCode::RET_ERR_ARG; |
| 280 | |
| 281 | size_t idx; |
| 282 | GetIdx(opt->nsub, sub_id, queue_id, idx); |
| 283 | |
| 284 | lock_guard<mutex> lock_guard(impl_->locks[idx]); |
| 285 | |
| 286 | auto &&item(impl_->buf[idx]); |
| 287 | memset(&item, 0, sizeof(item)); |
| 288 | |
| 289 | return comm::RetCode::RET_OK; |
| 290 | } |
| 291 | |
| 292 | comm::RetCode SyncCtrl::Flush(const int sub_id, const int queue_id) { |
| 293 | auto opt(impl_->store->GetStoreOption()); |
nothing calls this directly
no test coverage detected