Undocumented Behavior/Bug(?) traced to OSA_SemmaCreate

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Undocumented Behavior/Bug(?) traced to OSA_SemmaCreate

781件の閲覧回数
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 件の賞賛
返信
1 返信

701件の閲覧回数
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 件の賞賛
返信