lkml.org 
[lkml]   [2013]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 03/29] tsx: Add generic disable_txn macros
Date
From: Andi Kleen <ak@linux.intel.com>

Add generic macros to disable transactions per process.
Without TSX (or other HTM) support this is a noop.
An RTM enabled x86 kernel uses its own version.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
include/linux/thread_info.h | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h
index e7e0473..5a4bec0 100644
--- a/include/linux/thread_info.h
+++ b/include/linux/thread_info.h
@@ -148,6 +148,12 @@ static inline bool test_and_clear_restore_sigmask(void)
#error "no set_restore_sigmask() provided and default one won't work"
#endif

+#ifndef CONFIG_RTM_LOCKS
+#define disable_txn() do {} while (0)
+#define reenable_txn() do {} while (0)
+#define txn_disabled() 0
+#endif
+
#endif /* __KERNEL__ */

#endif /* _LINUX_THREAD_INFO_H */
--
1.7.7.6


\
 
 \ /
  Last update: 2013-03-23 02:41    [W:0.177 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site