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/include/linux provide spin_trylock_irq...



details:   https://anonhg.NetBSD.org/src/rev/cd149b0994ad
branches:  trunk
changeset: 1028700:cd149b0994ad
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 11:47:55 2021 +0000

description:
provide spin_trylock_irqsave


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

diffstat:

 sys/external/bsd/drm2/include/linux/spinlock.h |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r 950b66afb4fa -r cd149b0994ad sys/external/bsd/drm2/include/linux/spinlock.h
--- a/sys/external/bsd/drm2/include/linux/spinlock.h    Sun Dec 19 11:47:48 2021 +0000
+++ b/sys/external/bsd/drm2/include/linux/spinlock.h    Sun Dec 19 11:47:55 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: spinlock.h,v 1.12 2021/12/19 11:38:37 riastradh Exp $  */
+/*     $NetBSD: spinlock.h,v 1.13 2021/12/19 11:47:55 riastradh Exp $  */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -82,6 +82,10 @@
                mutex_enter(&((spinlock_t *)(SPINLOCK))->sl_lock);      \
        } while (0)
 
+#define        spin_trylock_irqsave(SPINLOCK, FLAGS)                           \
+               ( (FLAGS) = 0,                                          \
+               mutex_tryenter(&((spinlock_t *)(SPINLOCK))->sl_lock) )
+
 static inline void
 spin_unlock_irqrestore(spinlock_t *spinlock, unsigned long __unused flags)
 {



Home | Main Index | Thread Index | Old Index