mirror of
https://github.com/apache/nuttx.git
synced 2025-12-11 12:57:57 +08:00
libc/unistd: Replace pipe() macro with proper function implementation
Replace the pipe() macro definition with a proper function implementation to improve POSIX compliance and debugging capabilities. The new pipe() function serves as a wrapper around pipe2() with flags set to 0. Changes include: - Convert pipe() from macro to function declaration in unistd.h - Add lib_pipe.c implementation file with proper function documentation - Update build system files (CMakeLists.txt and Make.defs) to include the new source file when CONFIG_PIPES is enabled - Add pipe() entry to libc.csv for symbol tracking This change allows for better debugging, proper symbol resolution, and follows NuttX coding standards for library function implementations. Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
@@ -394,7 +394,7 @@ FAR void *sbrk(intptr_t incr);
|
||||
|
||||
/* Special devices */
|
||||
|
||||
#define pipe(fd) pipe2(fd, 0)
|
||||
int pipe(int pipefd[2]);
|
||||
int pipe2(int pipefd[2], int flags);
|
||||
|
||||
/* Schedule an alarm */
|
||||
|
||||
Reference in New Issue
Block a user