1*6f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2607ca46eSDavid Howells #ifndef _LINUX_POSIX_TYPES_H 3607ca46eSDavid Howells #define _LINUX_POSIX_TYPES_H 4607ca46eSDavid Howells 5607ca46eSDavid Howells #include <linux/stddef.h> 6607ca46eSDavid Howells 7607ca46eSDavid Howells /* 8607ca46eSDavid Howells * This allows for 1024 file descriptors: if NR_OPEN is ever grown 9607ca46eSDavid Howells * beyond that you'll have to change this too. But 1024 fd's seem to be 10607ca46eSDavid Howells * enough even for such "real" unices like OSF/1, so hopefully this is 11607ca46eSDavid Howells * one limit that doesn't have to be changed [again]. 12607ca46eSDavid Howells * 13607ca46eSDavid Howells * Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in 14607ca46eSDavid Howells * <sys/time.h> (and thus <linux/time.h>) - but this is a more logical 15607ca46eSDavid Howells * place for them. Solved by having dummy defines in <sys/time.h>. 16607ca46eSDavid Howells */ 17607ca46eSDavid Howells 18607ca46eSDavid Howells /* 19607ca46eSDavid Howells * This macro may have been defined in <gnu/types.h>. But we always 20607ca46eSDavid Howells * use the one here. 21607ca46eSDavid Howells */ 22607ca46eSDavid Howells #undef __FD_SETSIZE 23607ca46eSDavid Howells #define __FD_SETSIZE 1024 24607ca46eSDavid Howells 25607ca46eSDavid Howells typedef struct { 26607ca46eSDavid Howells unsigned long fds_bits[__FD_SETSIZE / (8 * sizeof(long))]; 27607ca46eSDavid Howells } __kernel_fd_set; 28607ca46eSDavid Howells 29607ca46eSDavid Howells /* Type of a signal handler. */ 30607ca46eSDavid Howells typedef void (*__kernel_sighandler_t)(int); 31607ca46eSDavid Howells 32607ca46eSDavid Howells /* Type of a SYSV IPC key. */ 33607ca46eSDavid Howells typedef int __kernel_key_t; 34607ca46eSDavid Howells typedef int __kernel_mqd_t; 35607ca46eSDavid Howells 36607ca46eSDavid Howells #include <asm/posix_types.h> 37607ca46eSDavid Howells 38607ca46eSDavid Howells #endif /* _LINUX_POSIX_TYPES_H */ 39