ck_hp: Rename *subscribe to *register.

ck_pring
Samy Al Bahra 14 years ago
parent 0f46b5907e
commit 7b8dfe44be

@ -93,8 +93,8 @@ ck_hp_clear(struct ck_hp_record *record)
void ck_hp_init(ck_hp_t *, unsigned int, unsigned int, ck_hp_destructor_t);
void ck_hp_set_threshold(ck_hp_t *, unsigned int);
void ck_hp_subscribe(ck_hp_t *, ck_hp_record_t *, void **);
void ck_hp_unsubscribe(ck_hp_record_t *);
void ck_hp_register(ck_hp_t *, ck_hp_record_t *, void **);
void ck_hp_unregister(ck_hp_record_t *);
ck_hp_record_t *ck_hp_recycle(ck_hp_t *);
void ck_hp_flush(ck_hp_record_t *);
void ck_hp_free(ck_hp_record_t *, ck_hp_hazard_t *, void *, void *);

@ -62,7 +62,7 @@ main(void)
fprintf(stderr, "ERROR: Failed to allocate slots.\n");
exit(EXIT_FAILURE);
}
ck_hp_subscribe(&fifo_hp, &record, r);
ck_hp_register(&fifo_hp, &record, r);
a = 0;
for (i = 0; i < STEPS; i++) {

@ -61,7 +61,7 @@ main(void)
fprintf(stderr, "ERROR: Failed to allocate slots.\n");
exit(EXIT_FAILURE);
}
ck_hp_subscribe(&stack_hp, &record, (void *)r);
ck_hp_register(&stack_hp, &record, (void *)r);
a = 0;
for (i = 0; i < STEPS; i++) {

@ -70,7 +70,7 @@ test(void *c)
exit(EXIT_FAILURE);
}
ck_hp_subscribe(&fifo_hp, &record, malloc(sizeof(void *) * 2));
ck_hp_register(&fifo_hp, &record, malloc(sizeof(void *) * 2));
ck_pr_inc_uint(&barrier);
while (ck_pr_load_uint(&barrier) < (unsigned int)nthr);

@ -75,7 +75,7 @@ thread(void *unused)
unused = NULL;
pointers = malloc(sizeof(void *));
ck_hp_subscribe(&stack_hp, &record, pointers);
ck_hp_register(&stack_hp, &record, pointers);
if (aff_iterate(&a)) {
perror("ERROR: failed to affine thread");

@ -151,7 +151,7 @@ thread(void *unused)
unused = NULL;
pointers = malloc(sizeof(void *));
ck_hp_subscribe(&stack_hp, &record, pointers);
ck_hp_register(&stack_hp, &record, pointers);
if (aff_iterate(&a)) {
perror("ERROR: failed to affine thread");

@ -70,7 +70,7 @@ main(int argc, char *argv[])
fprintf(stderr, "ERROR: Failed to allocate slot.\n");
exit(EXIT_FAILURE);
}
ck_hp_subscribe(&state, &record[0], pointers);
ck_hp_register(&state, &record[0], pointers);
ck_hp_flush(&record[0]);
entry = malloc(sizeof *entry);
@ -94,7 +94,7 @@ main(int argc, char *argv[])
fprintf(stderr, "ERROR: Failed to allocate slot.\n");
exit(EXIT_FAILURE);
}
ck_hp_subscribe(&state, &record[1], pointers);
ck_hp_register(&state, &record[1], pointers);
ck_hp_flush(&record[1]);
entry = malloc(sizeof *entry);

@ -92,7 +92,7 @@ ck_hp_set_threshold(struct ck_hp *state, unsigned int threshold)
}
void
ck_hp_unsubscribe(struct ck_hp_record *entry)
ck_hp_unregister(struct ck_hp_record *entry)
{
ck_pr_store_int(&entry->state, CK_HP_FREE);
@ -126,7 +126,7 @@ ck_hp_recycle(struct ck_hp *global)
}
void
ck_hp_subscribe(struct ck_hp *state,
ck_hp_register(struct ck_hp *state,
struct ck_hp_record *entry,
void **pointers)
{

Loading…
Cancel
Save