Lines Matching refs:target
76 struct _ck_array *target; in ck_array_put() local
84 target = array->active; in ck_array_put()
86 if (array->n_entries == target->length) { in ck_array_put()
87 size = target->length << 1; in ck_array_put()
89 target = array->allocator->realloc(target, in ck_array_put()
94 if (target == NULL) in ck_array_put()
97 ck_pr_store_uint(&target->length, size); in ck_array_put()
101 ck_pr_store_ptr(&array->active, target); in ck_array_put()
104 target->values[array->n_entries++] = value; in ck_array_put()
108 target = array->transaction; in ck_array_put()
109 if (array->n_entries == target->length) { in ck_array_put()
110 size = target->length << 1; in ck_array_put()
112 target = array->allocator->realloc(target, in ck_array_put()
117 if (target == NULL) in ck_array_put()
120 target->length = size; in ck_array_put()
121 array->transaction = target; in ck_array_put()
124 target->values[array->n_entries++] = value; in ck_array_put()
152 struct _ck_array *target; in ck_array_remove() local
156 target = array->transaction; in ck_array_remove()
159 if (target->values[i] == value) { in ck_array_remove()
160 target->values[i] = target->values[--array->n_entries]; in ck_array_remove()
168 target = array->active; in ck_array_remove()
171 if (target->values[i] == value) in ck_array_remove()
179 if (target->n_committed != array->n_entries) { in ck_array_remove()
180 ck_pr_store_ptr(&target->values[i], target->values[--array->n_entries]); in ck_array_remove()
189 target = ck_array_create(array->allocator, array->n_entries); in ck_array_remove()
190 if (target == NULL) in ck_array_remove()
193 memcpy(target->values, array->active->values, sizeof(void *) * array->n_entries); in ck_array_remove()
194 target->length = array->n_entries; in ck_array_remove()
195 target->n_committed = array->n_entries; in ck_array_remove()
196 target->values[i] = target->values[--array->n_entries]; in ck_array_remove()
198 array->transaction = target; in ck_array_remove()