What is the meaning of the *(volatile void**) in c?

Viewed 109

I was working on the "QNX RTOS" in which i came across the following line can anyone please help me to understand?

*(volatile  void **) kernel_data = (void *) & _mqx_version_number;  

Regards, Omkar Dixit

1 Answers

(volatile void **)kernel_data --> cast kernel_data to pointer to pointer of type volatile void.

Now, kernel_data is a pointer to pointer (volatile void**)
*kernel_data is pointer of type volatile void*

*(volatile void **) kernel_data = (void *) & _mqx_version_number;

So, here, we are type casting kernel_data to type volatile void ** and then dereferencing it.

Related