sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
fdman.h
Go to the documentation of this file.
1/*
2# _____ ___ ____ ___ ____
3# ____| | ____| | | |____|
4# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5#-----------------------------------------------------------------------
6# Copyright 2001-2004, ps2dev - http://www.ps2dev.org
7# Licenced under Academic Free License version 2.0
8# Review ps2sdk README & LICENSE files for further details.
9*/
10
15#ifndef _FDMAN_H_
16
17#include <sys/types.h>
18#include <ps2sdkapi.h>
19
20#define _FDMAN_H_
21
22#define __FILENO_MAX 64
23
24#define __IS_FD_VALID(FD) \
25 ( (FD >= 0) && (FD < __FILENO_MAX) && (__descriptormap[FD] != NULL) )
26
27typedef struct {
28 uint32_t flags;
29 uint32_t ref_count;
30 _libcglue_fdman_fd_info_t info;
32
33extern __descriptormap_type *__descriptormap[__FILENO_MAX];
34
35extern void __fdman_init();
36extern void __fdman_deinit();
37extern int __fdman_get_new_descriptor();
38extern int __fdman_get_dup_descriptor(int fd);
39extern int __fdman_get_dup2_descriptor(int fd, int newfd);
40extern void __fdman_release_descriptor(int fd);
41
42#endif