| 138 | } |
| 139 | |
| 140 | int queue_get_capacity(cls_method_context_t hctx, cls_queue_get_capacity_ret& op_ret) |
| 141 | { |
| 142 | //get head |
| 143 | cls_queue_head head; |
| 144 | int ret = queue_read_head(hctx, head); |
| 145 | if (ret < 0) { |
| 146 | return ret; |
| 147 | } |
| 148 | |
| 149 | op_ret.queue_capacity = head.queue_size - head.max_head_size; |
| 150 | |
| 151 | CLS_LOG(20, "INFO: queue_get_capacity: size of queue is %lu", op_ret.queue_capacity); |
| 152 | |
| 153 | return 0; |
| 154 | } |
| 155 | |
| 156 | |
| 157 | /* |
no test coverage detected