80cc38a1af
between creation of a file descriptor and close(2) when using kernel assisted threads. What we do is stick descriptors in the table, but mark them as "larval". This causes essentially everything to treat it as a non-existent descriptor, except for fdalloc(), which sees a filled slot so that it won't (incorrectly) allocate it again. When a descriptor is fully constructed, the code that has constructed it marks it as "mature" (which actually clears the "larval" flag), and things continue to work as normal. While here, gather all the code that gets a descriptor from the table into a fd_getfile() function, and call it, rather than having the same (sometimes incorrect) code copied all over the place. |
||
---|---|---|
.. | ||
Makefile | ||
TODO | ||
files.ibcs2 | ||
ibcs2_dirent.h | ||
ibcs2_errno.c | ||
ibcs2_errno.h | ||
ibcs2_exec.c | ||
ibcs2_exec.h | ||
ibcs2_exec_coff.c | ||
ibcs2_exec_elf32.c | ||
ibcs2_exec_xout.c | ||
ibcs2_fcntl.c | ||
ibcs2_fcntl.h | ||
ibcs2_grp.h | ||
ibcs2_ioctl.c | ||
ibcs2_ipc.c | ||
ibcs2_misc.c | ||
ibcs2_mman.h | ||
ibcs2_mount.h | ||
ibcs2_pwd.h | ||
ibcs2_signal.c | ||
ibcs2_signal.h | ||
ibcs2_socksys.c | ||
ibcs2_socksys.h | ||
ibcs2_stat.c | ||
ibcs2_stat.h | ||
ibcs2_statfs.h | ||
ibcs2_stropts.h | ||
ibcs2_syscall.h | ||
ibcs2_syscallargs.h | ||
ibcs2_syscalls.c | ||
ibcs2_sysent.c | ||
ibcs2_sysi86.h | ||
ibcs2_termios.h | ||
ibcs2_time.h | ||
ibcs2_timeb.h | ||
ibcs2_types.h | ||
ibcs2_unistd.h | ||
ibcs2_ustat.h | ||
ibcs2_util.h | ||
ibcs2_utime.h | ||
ibcs2_utsname.h | ||
ibcs2_wait.h | ||
syscalls.conf | ||
syscalls.master |