Wrap includes in sys/tslog.h with #ifdef TSLOG.

This is necessary because some non-kernel code #defines _KERNEL and then
includes kernel headers; as a result, it was getting conflicting versions
of curthread and curproc.  Non-kernel code should probably refrain from
defining _KERNEL, but for now hiding these indirect inclusions fixes the
build.

Reported by:	Michael Butler, Herbert J. Skuhra
This commit is contained in:
Colin Percival 2017-12-31 21:00:21 +00:00
parent a9bcc66178
commit 0337438d5d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=327447

View File

@ -29,8 +29,10 @@
#ifndef _TSLOG_H_
#define _TSLOG_H_
#ifdef TSLOG
#include <sys/_types.h>
#include <sys/pcpu.h>
#endif
#define TS_ENTER 0
#define TS_EXIT 1