fd: change allocation to add a lowest fd option

This commit is contained in:
Matheus
2022-09-23 19:37:25 -03:00
parent ff6999aa81
commit 67c9a04d58
4 changed files with 19 additions and 16 deletions
+1 -2
View File
@@ -46,11 +46,10 @@ typedef struct {
typedef struct {
int lock;
size_t fdcount;
uintmax_t firstfreefd;
fd_t** fd;
} fdtable_t;
int fd_alloc(fdtable_t* fdtable, fd_t** fd, int* ifd);
int fd_alloc(fdtable_t* fdtable, fd_t** fd, int* ifd, int lowest);
int fd_free(fdtable_t* fdtable, int ifd);
int fd_access(fdtable_t* fdtable, fd_t** fd, int ifd);
int fd_release(fd_t* fd);