aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/csan.h
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2019-11-21 11:22:08 +0000
committerAndrew Turner <andrew@FreeBSD.org>2019-11-21 11:22:08 +0000
commit849aef496d2ae19961310f4e92f3a0b928732d26 (patch)
treec9872d59d6c400ed994da160ee8d67aada890e55 /sys/sys/csan.h
parent489912da7bb487a33a7f0642a983c233b22381ba (diff)
downloadsrc-849aef496d2ae19961310f4e92f3a0b928732d26.tar.gz
src-849aef496d2ae19961310f4e92f3a0b928732d26.zip
Port the NetBSD KCSAN runtime to FreeBSD.
Update the NetBSD Kernel Concurrency Sanitizer (KCSAN) runtime to work in the FreeBSD kernel. It is a useful tool for finding data races between threads executing on different CPUs. This can be enabled by enabling KCSAN in the kernel config, or by using the GENERIC-KCSAN amd64 kernel. It works on amd64 and arm64, however the later needs a compiler change to allow -fsanitize=thread that KCSAN uses. Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D22315
Notes
Notes: svn path=/head/; revision=354942
Diffstat (limited to 'sys/sys/csan.h')
-rw-r--r--sys/sys/csan.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/sys/csan.h b/sys/sys/csan.h
index d38b656b6a20..3b5f9ee74304 100644
--- a/sys/sys/csan.h
+++ b/sys/sys/csan.h
@@ -27,23 +27,19 @@
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD$
*/
#ifndef _SYS_CSAN_H_
#define _SYS_CSAN_H_
-#ifdef _KERNEL_OPT
-#include "opt_kcsan.h"
-#endif
-
#include <sys/types.h>
#ifdef KCSAN
-void kcsan_init(void);
-void kcsan_cpu_init(struct cpu_info *);
+void kcsan_cpu_init(u_int);
#else
-#define kcsan_init() __nothing
-#define kcsan_cpu_init(ci) __nothing
+#define kcsan_cpu_init(ci) ((void)0)
#endif
#endif /* !_SYS_CSAN_H_ */