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

Tanu Kaskinen tanuk at iki.fi
Fri Oct 28 16:00:26 UTC 2016


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;
-- 
2.9.3



More information about the pulseaudio-discuss mailing list