fb52b1f8b4
* Increase FIFO buffer capacity from 32 to 64 KiB and the FIFO atomic write size ({BUF_SIZE}) from 512 bytes to 4 KiB (both like Linux). * Fix *pathconf(..., _PC_PIPE_BUF). It was returning 4 KiB although the implemented atomic write size was 512 bytes only. Now both *pathconf() and the FIFO implementation refer to the same constant.
41 lines
986 B
C
41 lines
986 B
C
/*
|
|
* Copyright 2002-2008, Axel Dörfler, axeld@pinc-software.de.
|
|
* Copyright 2013, Ingo Weinhold, ingo_weinhold@gmx.de.
|
|
* All rights reserved. Distributed under the terms of the MIT License.
|
|
*
|
|
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
|
* Distributed under the terms of the NewOS License.
|
|
*/
|
|
#ifndef _SYSTEM_VFS_DEFS_H
|
|
#define _SYSTEM_VFS_DEFS_H
|
|
|
|
|
|
#include <limits.h>
|
|
#include <sys/stat.h>
|
|
|
|
#include <SupportDefs.h>
|
|
|
|
|
|
struct fd_info {
|
|
int number;
|
|
int32 open_mode;
|
|
dev_t device;
|
|
ino_t node;
|
|
};
|
|
|
|
|
|
/* maximum write size to a pipe/FIFO that is guaranteed not to be interleaved
|
|
with other writes (aka {PIPE_BUF}; must be >= _POSIX_PIPE_BUF) */
|
|
#define VFS_FIFO_ATOMIC_WRITE_SIZE (4 * 1024)
|
|
|
|
/* pipe/FIFO buffer capacity */
|
|
#define VFS_FIFO_BUFFER_CAPACITY (64 * 1024)
|
|
|
|
// make sure the constant values are sane
|
|
#if VFS_FIFO_ATOMIC_WRITE_SIZE < _POSIX_PIPE_BUF
|
|
# error VFS_FIFO_ATOMIC_WRITE_SIZE < _POSIX_PIPE_BUF!
|
|
#endif
|
|
|
|
|
|
#endif /* _SYSTEM_VFS_DEFS_H */
|