Commit Graph

16 Commits

Author SHA1 Message Date
thorpej
80cc38a1af Fix a partial construction problem that can cause race conditions
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.
2001-06-14 20:32:41 +00:00
mrg
0b7f4cf1ba avoid trigraphs 2001-06-08 12:50:11 +00:00
mrg
c59b99f5c8 use _KERNEL_OPT, catch up with constification in compat/svr4. 2001-06-04 22:00:10 +00:00
mrg
6a89288a37 use _KERNEL_OPT. 2001-05-30 11:37:21 +00:00
kleink
045d2b0272 Make this build again. 2001-05-11 19:19:44 +00:00
manu
7e6929fe90 Changed EMUL_BSD_ASYNCIO_PIPE to EMUL_NO_BSD_ASYNCIO_PIPE, so that
the native emulation (NetBSD) does not have a flag.
2001-05-07 09:55:12 +00:00
ross
6b9d94cd8c Fix overflow errors in brk(2). 2001-05-06 04:32:08 +00:00
eeh
511e0204b1 Update to conform to new interface. 2001-04-10 18:57:49 +00:00
mrg
85b0b4096f s/rv/error/ in a uprintf(). (rv isn't defined.) 2001-03-16 04:05:15 +00:00
chs
ac3bc537bd eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS			0
KERN_INVALID_ADDRESS		EFAULT
KERN_PROTECTION_FAILURE		EACCES
KERN_NO_SPACE			ENOMEM
KERN_INVALID_ARGUMENT		EINVAL
KERN_FAILURE			various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE		ENOMEM
KERN_NOT_RECEIVER		<unused>
KERN_NO_ACCESS			<unused>
KERN_PAGES_LOCKED		<unused>
2001-03-15 06:10:32 +00:00
eeh
e330ffed34 Remove conflicts with changes made to COMPAT_SVR4. 2001-02-28 15:58:35 +00:00
eeh
82deda03bf Fixup compile problems. 2001-02-19 19:49:35 +00:00
eeh
800c3c476d Use svr4_ttold.c since it has no LP64 issues. 2001-02-19 15:48:59 +00:00
mrg
bc003b5676 use svr4_32 ttold ioctl types. 2001-02-18 00:27:20 +00:00
eeh
82ca5fba5b Fixes to get dynamic binaries working. 2001-02-11 01:10:24 +00:00
eeh
967cc758a6 Add 32-bit svr4 emulation (for 64-bit machines). 2001-02-06 16:37:56 +00:00