how to use NRF RPC without thread_custom_data

I want to use NRF RPC.

It seems to use thread_custom_data.

But, My application also use thread_custom_data.

Is there a way to use NRF RPC without thread_custom_data?
If not, please tell me a module that does not use thread_custom_data with the same functionality as NRF RPC.

Parents Reply
  • Hi 

    Sigurd is currently on vacation, and I will help out in the mean time. 

    Probably the easiest workaround would be to have a single thread accessing the nrf_rpc commands, and avoid using your framework for this particular thread. The main problem of this method is that if other threads need to communicate over RPC they need to pass the message to the other thread first. 

    If you are already using some kind of message queue or similar to buffer commands then the impact should be small, but if you have a lot of RPC calls being triggered from various threads then the impact will be higher and you will lose some efficiency. 

    loquat said:
    Is there a problem with using k_thread->init_data like thread_custom_data?

    I can't find any reference to the init_data field after the thread has been initialized, so using it might work, but I wouldn't recommend it as this is not tested. Also, the use of the init_data field might change in a future update. 

    Best regards
    Torbjørn

Children
Related