Date: Thu, 06 Sep 2001 18:35:57 -0700 (PDT) From: John Baldwin <jhb@FreeBSD.org> To: Julian Elischer <julian@vicor-nb.com> Cc: current@FreeBSD.org Subject: RE: RFC: hack volatile bzero and bcopy Message-ID: <XFMail.010906183557.jhb@FreeBSD.org> In-Reply-To: <3B981982.4E939CDF@vicor-nb.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 07-Sep-01 Julian Elischer wrote: > > Here is a hack to remove the 20 or so warning messages from if_ie.c > > Most of them are due to the supply of volatile pointers to bcopy and > bzero. > > I do the following to produce macros that call bzero and bcopy, but > don't produce > warning messages when called with volatile arguments. > > > typedef void Xcopy( void volatile *, void volatile *, int); >#define VBCOPY(A,B,L) (*(Xcopy *)&bcopy)((A),(B),(L)) > typedef void Xzero( void volatile *, int); >#define VBZERO(A,L) (*(Xzero *)&bzero)((A),(L)) sys/cdef.h already has some rather general purpose macros for thsi sort of thing in the form of __DEVOLATILE(), __DECONST(), and __DEQUALIFY(). -- John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.010906183557.jhb>