From owner-freebsd-current Wed Jan 27 18:16:14 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA19213 for freebsd-current-outgoing; Wed, 27 Jan 1999 18:16:14 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA19208 for ; Wed, 27 Jan 1999 18:16:12 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.2/8.9.1) id SAA90783; Wed, 27 Jan 1999 18:16:12 -0800 (PST) (envelope-from dillon) Date: Wed, 27 Jan 1999 18:16:12 -0800 (PST) From: Matthew Dillon Message-Id: <199901280216.SAA90783@apollo.backplane.com> To: current@FreeBSD.ORG Subject: Changing bzero, bcopy, memset, memcpy, etc... prototypes References: Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I would like to propose changing the prototype for the kernel memory zeroing and copying routines. Basically, the problem is that a whole hellofalot of drivers run bzero and bcopy on volatile memory. The only way to remove the warnings is to volatilize bzero and bcopy. The compiler will, I believe, upgrade a pointer to a non-volatile (aka char *) to a pointer to a volatile (aka volatile char *) without issuing any warnings. This change should be fully backwards compatible. So I propose changing FROM void bzero __P((void *buf, size_t len)); void bcopy __P((const void *from, void *to, size_t len)); TO void bzero __P((volatile void *buf, size_t len)); void bcopy __P((volatile const void *from, volatile void *to, size_t len)); Comments? -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message