nuttx/drivers/pipes
dongjiuzhu d452a05910 pollnotify: we should send poll events before semaphore incrementes.
There is a good case on sim platform:
When we input some cmd and click enter key to start application in terminal,
this context will change to application from IDLE loop. Althrough entey key '\r'
has been received to recv buffer and complete post semaphore of reader, but
pollnotify may not be called because context change. So when application run
poll function, because no events happend and poll enter wait, context will
again change to IDLE loop, this pollnotify of IDLE loop will run to send poll
events, poll function of applicaton will wake up. It's wrong!

Change-Id: I812a889f2e90781a9c3cb4b0251cccc4d32bebd1
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-10-26 08:27:09 -03:00
..
fifo.c Rename pipe2/mkfifo2 to nx_pipe/nx_mkfifo 2020-05-04 07:20:02 -06:00
Kconfig drivers/*/Kconfig: Consolidate driver Kconfig Files. 2020-02-15 15:19:11 +01:00
Make.defs Remove exra whitespace from files (#189) 2020-01-31 09:24:49 -06:00
pipe_common.c pollnotify: we should send poll events before semaphore incrementes. 2020-10-26 08:27:09 -03:00
pipe_common.h drivers/pipes: Use inode reference counter instead of device reference counter to handle dup(). I found that if I dup() a pipe, the reference counter d_refs is not increased. If I close any of the fd, backed by the same pipe, the pipe will be freed. This causes any further usage on the fd referencing a non existent pipe. This change uses the inode reference counter, which is properly maintained during dup(). 2019-08-06 07:31:57 -06:00
pipe.c libs/libc/unistd: Implement pipe2(2) syscall 2020-09-18 20:01:26 -07:00