Subject: kern/10770: tsleep(9) does not document need to include sys/proc.h
To: None <>
From: None <>
List: netbsd-bugs
Date: 08/06/2000 19:35:13
>Number:         10770
>Category:       kern
>Synopsis:       tsleep(9) does not document need to include sys/proc.h
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 06 19:36:00 PDT 2000
>Release:        NetBSD 1.5_ALPHA
Highly Unlikely
	NetBSD 1.5_ALPHA home-built snapshot of 8/2/00 (on x86, not that 
	it matters)

	If one is building an LKM that uses tsleep(9) and one does not include
	sys/proc.h in the source file, the LKM will link but will not load.

	This is due to the change of tsleep(9) from a function to a macro
	that calls ltsleep() with a NULL lock argument, so there really *is*
	not tsleep() function in the kernel anymore.

	All this would be fine, except the requirement to include sys/proc.h
	is not stated in the tsleep(9) man page, and other than the load 
	error below, all goes well.  

	If this macro-ization of tsleep(9) is a precursor to the deprecation
	or replacement of the interface, it would also be nice to note that 
	in the man page.

	Call tsleep(9) from LKM source without including sys/proc.h.

	Have link succeed, but load fail thusly:
	    lcd.o: In function `lcdread':
	    lcd.o(.text+0x3fc): undefined reference to `tsleep'

	Mention necessary inclusion of sys/proc.h in tsleep(9).
	Possibly mention flux of tsleep() interface in same page, if that
	is indeed the case.