Lines Matching defs:idx
595 SHMCBIndex *idx = SHMCB_INDEX(subcache, subcache->idx_pos);
597 idx_expiry = idx->expires;
709 SHMCBIndex *idx = NULL;
712 idx = SHMCB_INDEX(subcache, new_idx_pos);
713 if (idx->removed)
715 else if (idx->expires <= now)
734 /* There remain other indexes, so we can use idx to adjust 'data' */
736 idx->data_pos,
743 subcache->data_pos = idx->data_pos;
757 SHMCBIndex *idx;
779 idx = SHMCB_INDEX(subcache, subcache->idx_pos);
797 subcache->data_used -= SHMCB_CYCLIC_SPACE(idx->data_pos, idx2->data_pos,
803 idx = idx2;
836 idx = SHMCB_INDEX(subcache, new_idx);
837 idx->expires = expiry;
838 idx->data_pos = id_offset;
839 idx->data_used = total_len;
840 idx->id_len = id_len;
841 idx->removed = 0;
844 "insert happened at idx=%d, data=(%u:%u)", new_idx,
866 SHMCBIndex *idx = SHMCB_INDEX(subcache, pos);
868 /* Only consider 'idx' if the id matches, and the "removed"
873 if (!idx->removed
874 && idx->id_len == idlen
875 && (idx->data_used - idx->id_len) <= *destlen
878 idx->data_pos, id, idx->id_len) == 0) {
880 "match at idx=%d, data=%d", pos, idx->data_pos);
881 if (idx->expires > now) {
885 data_offset = SHMCB_CYCLIC_INCREMENT(idx->data_pos,
886 idx->id_len,
889 *destlen = idx->data_used - idx->id_len;
900 idx->removed = 1;
927 SHMCBIndex *idx = SHMCB_INDEX(subcache, pos);
929 /* Only consider 'idx' if the id matches, and the "removed"
931 if (!idx->removed && idx->id_len == idlen
934 idx->data_pos, id, idx->id_len) == 0) {
936 "possible match at idx=%d, data=%d", pos, idx->data_pos);
939 idx->removed = 1;
970 SHMCBIndex *idx = SHMCB_INDEX(subcache, pos);
972 /* Only consider 'idx' if the "removed" flag isn't set. */
973 if (!idx->removed) {
976 "iterating idx=%d, data=%d", pos, idx->data_pos);
977 if (idx->expires > now) {
984 data_offset = SHMCB_CYCLIC_INCREMENT(idx->data_pos,
985 idx->id_len,
988 dest_len = idx->data_used - idx->id_len;
990 buf_req = APR_ALIGN_DEFAULT(idx->id_len + 1)
1002 dest = *buf + APR_ALIGN_DEFAULT(idx->id_len + 1);
1007 idx->data_pos, idx->id_len);
1008 id[idx->id_len] = '\0';
1015 rv = iterator(instance, s, userctx, id, idx->id_len,
1024 idx->removed = 1;