PSPSDK 2024-12-16
Loading...
Searching...
No Matches
fdman.h File Reference
#include <sys/types.h>
Include dependency graph for fdman.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  __descriptormap_type
 

Macros

#define __FILENO_MAX   1024
 
#define __IS_FD_VALID(FD)    ( (FD >= 0) && (FD < __FILENO_MAX) && (__descriptormap[FD] != NULL) )
 
#define __IS_FD_OF_TYPE(FD, TYPE)    ( (__IS_FD_VALID(FD)) && (__descriptormap[FD]->type == TYPE) )
 

Enumerations

enum  __fdman_fd_types {
  __DESCRIPTOR_TYPE_FILE , __DESCRIPTOR_TYPE_FOLDER , __DESCRIPTOR_TYPE_PIPE , __DESCRIPTOR_TYPE_SOCKET ,
  __DESCRIPTOR_TYPE_TTY
}
 

Functions

void __fdman_init ()
 
int __fdman_get_new_descriptor ()
 
int __fdman_get_dup_descriptor (int fd)
 
void __fdman_release_descriptor (int fd)
 

Variables

__descriptormap_type__descriptormap [__FILENO_MAX]
 

Macro Definition Documentation

◆ __FILENO_MAX

#define __FILENO_MAX   1024

◆ __IS_FD_OF_TYPE

#define __IS_FD_OF_TYPE (   FD,
  TYPE 
)     ( (__IS_FD_VALID(FD)) && (__descriptormap[FD]->type == TYPE) )

◆ __IS_FD_VALID

#define __IS_FD_VALID (   FD)     ( (FD >= 0) && (FD < __FILENO_MAX) && (__descriptormap[FD] != NULL) )

Enumeration Type Documentation

◆ __fdman_fd_types

Enumerator
__DESCRIPTOR_TYPE_FILE 
__DESCRIPTOR_TYPE_FOLDER 
__DESCRIPTOR_TYPE_PIPE 
__DESCRIPTOR_TYPE_SOCKET 
__DESCRIPTOR_TYPE_TTY 

Function Documentation

◆ __fdman_get_dup_descriptor()

int __fdman_get_dup_descriptor ( int  fd)

◆ __fdman_get_new_descriptor()

int __fdman_get_new_descriptor ( )

◆ __fdman_init()

void __fdman_init ( )

◆ __fdman_release_descriptor()

void __fdman_release_descriptor ( int  fd)

Variable Documentation

◆ __descriptormap

__descriptormap_type* __descriptormap[__FILENO_MAX]
extern