From 40dc2e13ef675cc0f57ec47d536777b2e336ef0c Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Mon, 27 Aug 2012 21:09:59 +0200 Subject: [PATCH] Make the clock release method a public function. Signed-off-by: Richard Cochran --- clock.c | 2 +- clock.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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.