ck_epoch: add barrier_wait operation.

ck_pring
Samy Al Bahra 8 years ago
parent 8580ccc580
commit ec2d225324

@ -258,6 +258,12 @@ bool ck_epoch_poll(ck_epoch_record_t *);
void ck_epoch_synchronize(ck_epoch_record_t *);
void ck_epoch_synchronize_wait(ck_epoch_t *, ck_epoch_wait_cb_t *, void *);
void ck_epoch_barrier(ck_epoch_record_t *);
void ck_epoch_barrier_wait(ck_epoch_record_t *, ck_epoch_wait_cb_t *, void *);
/*
* Reclaim entries associated with a record. This is safe to call only on
* the caller's record or records that are using call_strict.
*/
void ck_epoch_reclaim(ck_epoch_record_t *);
#endif /* CK_EPOCH_H */

@ -531,6 +531,16 @@ ck_epoch_barrier(struct ck_epoch_record *record)
return;
}
void
ck_epoch_barrier_wait(struct ck_epoch_record *record, ck_epoch_wait_cb_t *cb,
void *ct)
{
ck_epoch_synchronize_wait(record->global, cb, ct);
ck_epoch_reclaim(record);
return;
}
/*
* It may be worth it to actually apply these deferral semantics to an epoch
* that was observed at ck_epoch_call time. The problem is that the latter

Loading…
Cancel
Save