Undocumented Behavior/Bug(?) traced to OSA_SemmaCreate

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Undocumented Behavior/Bug(?) traced to OSA_SemmaCreate

336 Views
mikesandlin
Contributor I

I ran into a problem using nio_pipe_write. Writes appeared to be blocked by default. I finally traced the problem to OSA_SemmaCreate. The pipe initialization function takes a _mqx_uint argument, which is a uint32, to set pipe length. It uses this as the initial value to create a lwsemaphore that tracks the amount of data written into the pipe, and blocks writes when the pipe is full. The problem is that the nio_pipe_init routine uses the OSA, and the OSA_SemmaCreate function specifies uint8, for reasons unknown. I specified a pipe length of 256 bytes, which was truncated to zero by the OSA_SemmaCreate call. Therefore, pipe writes were blocked at pipe initialization.

For now, I can simply reduce my pipe length by one byte, but I anticipate the need for longer pipes further on. Are there repercussions I am not aware of if I simply modified the OSA_SemmaCreate function call to use a uint32 initial value?

Thanks for any responses.

0 Kudos
1 Reply

256 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Sandlin:

Thank you for reporting this issue, I submitted a ticket for this. I will keep you informed when I have results.

Regards

Daniel

0 Kudos