Thread-safety of API's

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
RoKl_290166
Level 4
Level 4
Welcome!

Hi,

   

in my FX3-firmware I have two threads where one thread accesses one DMA-channel and another thread accesses another DMA-channel. For accessing the DMA-channels I use both the same API CyU3PDmaChannelGetBuffer(), CyU3PDmaChannelCommitBuffer() and CyU3PDmaChannelDiscardBuffer().

   

Do I have to protect the accesses to the DMA-engine by a mutex so that only one thread accesses the same API or are the API's thread-safe in a way that in the API-implementation the accesses are already protected by mutexes?

   

 

   

Regards,

   

Rob

0 Likes
1 Reply
Anonymous
Not applicable

Hi Rob,

   

Yes. They are already protected by mutexes.

   

 

   

Thanks,

   

sai krishna.

0 Likes