Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/linux Add hrtimer_destroy



details:   https://anonhg.NetBSD.org/src/rev/3d5fcb8bb54b
branches:  trunk
changeset: 1028732:3d5fcb8bb54b
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 11:53:09 2021 +0000

description:
Add hrtimer_destroy


Author: Maya Rashish <maya%NetBSD.org@localhost>
Committer: Taylor R Campbell <riastradh%NetBSD.org@localhost>

diffstat:

 sys/external/bsd/drm2/include/linux/hrtimer.h |   4 +++-
 sys/external/bsd/drm2/linux/linux_hrtimer.c   |  13 +++++++++----
 2 files changed, 12 insertions(+), 5 deletions(-)

diffs (64 lines):

diff -r 321c8dddb162 -r 3d5fcb8bb54b sys/external/bsd/drm2/include/linux/hrtimer.h
--- a/sys/external/bsd/drm2/include/linux/hrtimer.h     Sun Dec 19 11:53:02 2021 +0000
+++ b/sys/external/bsd/drm2/include/linux/hrtimer.h     Sun Dec 19 11:53:09 2021 +0000
@@ -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 @@
 #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_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);
diff -r 321c8dddb162 -r 3d5fcb8bb54b sys/external/bsd/drm2/linux/linux_hrtimer.c
--- a/sys/external/bsd/drm2/linux/linux_hrtimer.c       Sun Dec 19 11:53:02 2021 +0000
+++ b/sys/external/bsd/drm2/linux/linux_hrtimer.c       Sun Dec 19 11:53:09 2021 +0000
@@ -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 @@
                 */
                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



Home | Main Index | Thread Index | Old Index