From owner-freebsd-current Wed Jan 27 19:13:03 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA27513 for freebsd-current-outgoing; Wed, 27 Jan 1999 19:13:03 -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 TAA27508 for ; Wed, 27 Jan 1999 19:13:02 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.2/8.9.1) id TAA92729; Wed, 27 Jan 1999 19:12:51 -0800 (PST) (envelope-from dillon) Date: Wed, 27 Jan 1999 19:12:51 -0800 (PST) From: Matthew Dillon Message-Id: <199901280312.TAA92729@apollo.backplane.com> To: Bruce Evans Cc: current@FreeBSD.ORG Subject: Re: Changing bzero, bcopy, memset, memcpy, etc... prototypes References: <199901280301.OAA25274@godzilla.zeta.org.au> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG : :No. bzero() and bcopy() are for handling ordinary memory. There is no :proper way to volatilize them without pessimizing them. Adding volatile :to their prototypes won't actually make them handle volatile memory; it :just breaks the warnings. Some of the i586-optimized versions in fact :don't handle volatile memory properly - they do things like reading some :locations twice to prefetch the cache lines. Even ordinary bcopy() via :movsl accesses memory backwards in some cases. : :Drivers should use the bus access macros. : :Bruce Hmmm.. quite a bit more work. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message