Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Mar 1999 11:50:45 -0800 (PST)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        "Daniel C. Sobral" <dcs@newsguy.com>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: volatile question
Message-ID:  <199903171950.LAA31589@apollo.backplane.com>
References:   <36EFF74A.F42597F4@newsguy.com>

next in thread | previous in thread | raw e-mail | index | archive | help
: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 
					<dillon@backplane.com>

:--
: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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199903171950.LAA31589>