Module Name: src
Committed By: riastradh
Date: Sun Dec 19 11:53:09 UTC 2021
Modified Files:
src/sys/external/bsd/drm2/include/linux: hrtimer.h
src/sys/external/bsd/drm2/linux: linux_hrtimer.c
Log Message:
Add hrtimer_destroy
Author: Maya Rashish <[email protected]>
Committer: Taylor R Campbell <[email protected]>
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/include/linux/hrtimer.h
cvs rdiff -u -r1.1 -r1.2 src/sys/external/bsd/drm2/linux/linux_hrtimer.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/drm2/include/linux/hrtimer.h
diff -u src/sys/external/bsd/drm2/include/linux/hrtimer.h:1.5 src/sys/external/bsd/drm2/include/linux/hrtimer.h:1.6
--- src/sys/external/bsd/drm2/include/linux/hrtimer.h:1.5 Sun Dec 19 11:36:57 2021
+++ src/sys/external/bsd/drm2/include/linux/hrtimer.h Sun Dec 19 11:53:09 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: hrtimer.h,v 1.5 2021/12/19 11:36:57 riastradh Exp $ */
+/* $NetBSD: hrtimer.h,v 1.6 2021/12/19 11:53:09 riastradh Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -59,6 +59,7 @@ enum hrtimer_restart {
#define hrtimer_active linux_hrtimer_active
#define hrtimer_add_expires_ns linux_hrtimer_add_expires_ns
#define hrtimer_cancel linux_hrtimer_cancel
+#define hrtimer_destroy linux_hrtimer_destroy
#define hrtimer_forward linux_hrtimer_forward
#define hrtimer_forward_now linux_hrtimer_forward_now
#define hrtimer_init linux_hrtimer_init
@@ -73,6 +74,7 @@ void hrtimer_start(struct hrtimer *, kti
void hrtimer_start_range_ns(struct hrtimer *, ktime_t, uint64_t,
enum hrtimer_mode);
int hrtimer_cancel(struct hrtimer *);
+void hrtimer_destroy(struct hrtimer *);
bool hrtimer_active(struct hrtimer *);
uint64_t hrtimer_forward(struct hrtimer *, ktime_t, ktime_t);
uint64_t hrtimer_forward_now(struct hrtimer *, ktime_t);
Index: src/sys/external/bsd/drm2/linux/linux_hrtimer.c
diff -u src/sys/external/bsd/drm2/linux/linux_hrtimer.c:1.1 src/sys/external/bsd/drm2/linux/linux_hrtimer.c:1.2
--- src/sys/external/bsd/drm2/linux/linux_hrtimer.c:1.1 Sun Dec 19 11:23:52 2021
+++ src/sys/external/bsd/drm2/linux/linux_hrtimer.c Sun Dec 19 11:53:09 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_hrtimer.c,v 1.1 2021/12/19 11:23:52 riastradh Exp $ */
+/* $NetBSD: linux_hrtimer.c,v 1.2 2021/12/19 11:53:09 riastradh Exp $ */
/*-
* Copyright (c) 2021 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_hrtimer.c,v 1.1 2021/12/19 11:23:52 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_hrtimer.c,v 1.2 2021/12/19 11:53:09 riastradh Exp $");
#include <sys/types.h>
#include <sys/callout.h>
@@ -151,13 +151,18 @@ hrtimer_cancel(struct hrtimer *hrt)
*/
active = callout_pending(&H->ch);
}
+ return active;
+}
+
+void
+hrtimer_destroy(struct hrtimer *hrt)
+{
+ struct hrtimer_private *H = hrt->hrt_private;
callout_destroy(&H->ch);
kmem_free(H, sizeof(*H));
explicit_memset(hrt, 0, sizeof(*hrt)); /* paranoia */
-
- return active;
}
bool