Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1373826
| From | Hannes Frederic Sowa <hannes@stressinduktion.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH net] lockdep: provide always true lockdep_is_held stub if lockdep disabled |
| Date | 2016-04-08 01:20 +0200 |
| Message-ID | <rlrnr-2VG-7@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
I need this to provide a generic lockdep_sock_is_held function which can
be easily used in the kernel without using ifdef PROVEN macros.
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
---
Hello Peter and Ingo,
if it is possible coud this go in via the net-tree, as this problem is
visible there already? Would be happy to get a review.
Thanks,
Hannes
include/linux/lockdep.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index d026b190c53066..dc8d447cb3ab1c 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -428,6 +428,8 @@ struct lock_class_key { };
#define lockdep_pin_lock(l) do { (void)(l); } while (0)
#define lockdep_unpin_lock(l) do { (void)(l); } while (0)
+#define lockdep_is_held(l) ({ (void)(l); (1); })
+
#endif /* !LOCKDEP */
#ifdef CONFIG_LOCK_STAT
--
2.5.5
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH net] lockdep: provide always true lockdep_is_held stub if lockdep disabled Hannes Frederic Sowa <hannes@stressinduktion.org> - 2016-04-08 01:20 +0200 Re: [PATCH net] lockdep: provide always true lockdep_is_held stub if lockdep disabled Hannes Frederic Sowa <hannes@stressinduktion.org> - 2016-04-08 01:30 +0200
csiph-web