From owner-freebsd-hackers Wed Mar 17 11:51:10 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (Postfix) with ESMTP id 543881527C for ; Wed, 17 Mar 1999 11:51:05 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id LAA31589; Wed, 17 Mar 1999 11:50:45 -0800 (PST) (envelope-from dillon) Date: Wed, 17 Mar 1999 11:50:45 -0800 (PST) From: Matthew Dillon Message-Id: <199903171950.LAA31589@apollo.backplane.com> To: "Daniel C. Sobral" Cc: hackers@FreeBSD.ORG Subject: Re: volatile question References: <36EFF74A.F42597F4@newsguy.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :typedef struct aiocb { : int aio_fildes; /* File descriptor */ : off_t aio_offset; /* File offset for I/O */ : volatile void *aio_buf; /* I/O buffer in process :space */ : ^^^^^^^^^^^^^^^^^^^^^^^ : :Is the volatile keyword in the right position? Shouldn't it be void* :volatile aio_buf? It depends whether you want a pointer to volatile data, or whether you want a volatile pointer to normal data. volatile void *aio_buf; normal pointer to volatile data void * volatile aio_buf; volatile pointer to normal data volatile void * volatile aio_buf; volatile pointer to volatile data -Matt Matthew Dillon :-- :Daniel C. Sobral (8-DCS) :dcs@newsguy.com :dcs@freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message