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
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
(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.