c6942f6137
According to the specification, the close function must wait until all data has been written before it closes the file (except O_NONBLOCK is set). The maximum waiting time for this is not specified. To be able to edit the file list of the process, the close function has to lock the file list semaphore. After that the close function of the serial driver is called. Waiting for the complete transmission of all data is done in the serial driver. This causes the semaphore to remain locked until all data has been sent. However, no other thread of the process can edit the file list for that time (open, close, dup2, etc.). This is not optimal in a multithreaded environment. Therefore, we have to keep the waiting time within the driver as short as possible. |
||
---|---|---|
.. | ||
Kconfig | ||
lowconsole.c | ||
Make.defs | ||
ptmx.c | ||
pty.c | ||
pty.h | ||
serial_dma.c | ||
serial_io.c | ||
serial.c | ||
tcdrain.c | ||
uart_16550.c |