Subject: kern/4244: parameter wchan to tsleep should be const
To: None <gnats-bugs@gnats.netbsd.org>
From: Martin Husemann <martin@rumolt.teuto.de>
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
>Last-Modified:
>Originator:     Martin Husemann
>Organization:
UP-Vision Computergraphik
>Release:        current as of 3-Oct-97
>Environment:
System: NetBSD rumolt.teuto.de 1.2G NetBSD 1.2G (RUMOLT) #1: Mon Oct 6 09:02:07 MEST 1997 root@hwart.teuto.de:/usr/src/sys-local/arch/i386/compile/RUMOLT i386


>Description:

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.

>How-To-Repeat:

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

>Fix:

Declare it const.
>Audit-Trail:
>Unformatted: