diff --git a/clock.c b/clock.c index b3e5096..28e9e52 100644 --- a/clock.c +++ b/clock.c @@ -85,7 +85,7 @@ static int cid_eq(struct ClockIdentity *a, struct ClockIdentity *b) return 0 == memcmp(a, b, sizeof(*a)); } -static void clock_destroy(struct clock *c) +void clock_destroy(struct clock *c) { int i; for (i = 0; i < c->nports; i++) { diff --git a/clock.h b/clock.h index 92c61d4..56eac92 100644 --- a/clock.h +++ b/clock.h @@ -77,6 +77,12 @@ struct clock *clock_create(int phc_index, struct interface *iface, int count, */ struct dataset *clock_default_ds(struct clock *c); +/** + * Free all of the resources associated with a clock. + * @param c The clock instance. + */ +void clock_destroy(struct clock *c); + /** * Obtain the domain number from a clock's default data set. * @param c The clock instance.