Add mkfifo2() and pipe2() which are just like mkfifo() and pipe(), but allow control of the size of the underlying, in-memory circular buffer

This commit is contained in:
Gregory Nutt
2016-07-19 13:51:05 -06:00
parent 9a44f3017b
commit 671d7fae31
4 changed files with 90 additions and 22 deletions
+1
View File
@@ -130,6 +130,7 @@ extern "C"
#endif
int mkdir(FAR const char *pathname, mode_t mode);
int mkfifo2(FAR const char *pathname, mode_t mode, size_t bufsize); /* NuttX only */
int mkfifo(FAR const char *pathname, mode_t mode);
int stat(const char *path, FAR struct stat *buf);
#if 0 /* Not yet supported */
+2 -1
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* include/unistd.h
*
* Copyright (C) 2007-2009, 2013-2014 Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2009, 2013-2014, 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -174,6 +174,7 @@ FAR void *sbrk(intptr_t incr);
/* Special devices */
int pipe2(int fd[2], size_t bufsize); /* NuttX only */
int pipe(int fd[2]);
/* Working directory operations */