fgetc() is busywait over high priority threads ?

ranshalit wrote on Sunday, April 14, 2019:

Hello,

I have some strange behavior when using fgetc, which I am not sure how
to handle.
I have a thread which is responsible for sort of custom console which
is using fgetc.
It seems that this threads get over any other threads (even if it is
put in the lowest priority). On halting the thread I see that it waits
on fgetc.

Can anyone explain why it behaves like this and how we can overcome it ?

Thank you,
ranran

rtel wrote on Sunday, April 14, 2019:

fgetc() is part of your C library, and not part of FreeRTOS. As each C library will implement this differently, not to mention the differences in implementations depending on the hardware and potentially the debug interface you are using, we can’t really provide a helpful answer without any implementation detail.

ranshalit wrote on Wednesday, April 17, 2019:

I understand.
Well its IAR compiler for ARM STM32H7, so it is probably a question to IAR.
I am not sure why they implemented fgetc is busy wait, and how to overcome this.

Thanks,
ran

On Sun, Apr 14, 2019 at 9:24 PM Richard Barry
rtel@users.sourceforge.net wrote:

fgetc() is part of your C library, and not part of FreeRTOS. As each C library will implement this differently, not to mention the differences in implementations depending on the hardware and potentially the debug interface you are using, we can’t really provide a helpful answer without any implementation detail.


fgetc() is busywait over high priority threads ?


Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/freertos/discussion/382005/

To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/