[PATCH] thread-mainloop: fix volatile use in example

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 28.10.2016 18:00, Tanu Kaskinen wrote:
> In the example, drain_result is a volatile pointer to an int, not
> a regular pointer to a volatile int.
> ---
>   src/pulse/thread-mainloop.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/pulse/thread-mainloop.h b/src/pulse/thread-mainloop.h
> index 40278b4..e69298a 100644
> --- a/src/pulse/thread-mainloop.h
> +++ b/src/pulse/thread-mainloop.h
> @@ -164,7 +164,7 @@ PA_C_DECL_BEGIN
>    * access this data safely, we must extend our example a bit:
>    *
>    * \code
> - * static volatile int *drain_result = NULL;
> + * static int * volatile drain_result = NULL;
>    *
>    * static void my_drain_callback(pa_stream*s, int success, void *userdata) {
>    *     pa_threaded_mainloop *m;

Looks good to me.



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux