Subject: kern/4244: parameter wchan to tsleep should be const
To: None <>
From: Martin Husemann <>
List: netbsd-bugs
Date: 10/08/1997 21:11:09
>Number:         4244
>Category:       kern
>Synopsis:       the char *wchan passed to tsleep() is not declared const
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Oct  8 13:20:01 1997
>Originator:     Martin Husemann
UP-Vision Computergraphik
>Release:        current as of 3-Oct-97
System: NetBSD 1.2G NetBSD 1.2G (RUMOLT) #1: Mon Oct 6 09:02:07 MEST 1997 i386


You can't pass a "const char *" as the name of the wait channel when calling
tsleep. According to the manual page this parameter is only used for diagnostic
output, so it should be const.


	static const char wchan[] = "my wait channel";
	tsleep(&..., 0, wchan, 0);


Declare it const.