|
application ends while I/O unfinished
|
When a task's main function exits, the task is stopped. If the task uses C standard I/O, the run-time library winds down the I/O system and closes any open files. If there are other threads that have not finished their I/O, the files they are using may be incomplete.
|
|
multiple use of run-time library
|
Many parts of the run-time library cannot be used by more than one thread at a time. In a multi-threaded task, you should wait for the semaphore par_sema before using run-time library functions marked as server, or use the special protected versions of certain functions, which are defined in par.h.
|
|
task unilaterally stops application
|
In a multi-task application, any task can terminate the whole application by calling _server_terminate_now. If other tasks have not completed their I/O, data may be lost and files corrupted.
|
|
|