Hi, I try to call OS functions from Win32 Simulator. Task in blocking call, like getchar() considered by RTOS as in “running”state. Is it possible to tell to schduler that a task in “Blocking” state? Best regards Rasty
Rasty, the Windows demo indeed has a limitation: you are not allowed to do any Windows API call. The problem is that when you call an API, the tasks ( = thread ) gets into a sleeping state. The FreeRTOS scheduler then allow the next task to become active. When the API is finished, there is a risk of having 2 FreeRTOS tasks to become active at the same time. I am wondering what happens if you temporarily stop the scheduler: ~~~ vTaskSuspendAll(); fprintf(outfile, “Donen”); xTaskResumeAll(); ~~~ Could you try that?
Hi Hein, Did not work out 🙁 Got semaphore timeout in defferent task. I actually checked Win32 demos with sockets before asking this question, but did not see any code that tells kernel that recv() is going to block. Need some specific API for Simulator, that tells kernel that task enters/leaves Blocking state. This would be very useful for getchar()/gets() and socket operations. Best regards Rasty
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.