thorpej
e3669c3393
Add "use counting" to file entries. When closing a file, and it's reference
...
count is 0, wait for use count to drain before finishing the close.
This is necessary in order for multiple processes to safely share file
descriptor tables.
1999-05-05 20:01:01 +00:00
perry
275d1554aa
Abolition of bcopy, ovbcopy, bcmp, and bzero, phase one.
...
bcopy(x, y, z) -> memcpy(y, x, z)
ovbcopy(x, y, z) -> memmove(y, x, z)
bcmp(x, y, z) -> memcmp(x, y, z)
bzero(x, y) -> memset(x, 0, y)
1998-08-04 04:03:10 +00:00
kleink
c68582d64b
UIO_MAXIOV -> IOV_MAX
1998-08-03 15:01:00 +00:00
perry
730baa7431
fix sizeofs so they comply with the KNF style guide. yes, it is pedantic.
1998-07-31 22:50:48 +00:00
kleink
17de9df6c1
Reject an iovcnt argument of 0 to readv(), writev(), preadv() and pwritev()
...
as invalid. This has been stated by the respective manual pages at least
since Net/2, and is the behaviour specified by XSH5.
1998-07-31 15:38:58 +00:00
thorpej
939279f988
When checking for overflow in the residual count, test against SSIZE_MAX.
...
The read/write system calls return ssize_t because -1 is used to indicate
error, therefore the transfer size MUST be limited to SSIZE_MAX, otherwise
garbage can be returned to the user.
There is NO change from existing behavior here, only a more precise
definition of that the semantics are, except in the Alpha case, where
the full SSIZE_MAX transfer size can now be realized (ssize_t is 64-bit
on the Alpha).
1998-07-28 17:58:29 +00:00
thorpej
b6781dbaa2
Split up read/readv/write/writev into the system call front-end and
...
the guts that actually perform the I/O request.
1998-06-30 07:39:22 +00:00
thorpej
a4a34ba74a
Add two additional arguments to the fileops read and write calls, a
...
pointer to the offset to use, and a flags word. Define a flag that
specifies whether or not to update the offset passed by reference.
1998-06-30 05:33:11 +00:00
thorpej
808867c7cf
defopt KTRACE
1998-06-25 21:17:15 +00:00
fvdl
e5bc90f40c
Merge with Lite2 + local changes
1998-03-01 02:20:01 +00:00
thorpej
97d2a58201
Fix slight argument bogosity with getgroups(), setgroups(), select(),
...
and swapctl(). For the former three, they use an 'int' in their user-land
prototype which was a 'u_int' in the kernel, which screwed up automatic
generation/checking of lint syscall stubs. For the latter, the user-land
prototype uses a "const char *", but the syscall just used "char *".
From Chris Demetriou <cgd@pa.dec.com>.
1997-11-04 21:24:14 +00:00
mycroft
2587de6af9
Adjust u_int arguments of some system calls to int, to match user-level
...
prototypes.
1997-10-15 17:03:52 +00:00
mrg
3a0a1d42da
in pollscan, cast incoming fd to unsigned int. from mycroft.
1997-02-23 02:23:07 +00:00
mrg
d1b433e462
check that fd being poll()ed is valid. from mycroft.
1997-02-18 04:20:54 +00:00
cgd
e7af2a8237
* catch up with system call argument type fixups/const poisoning.
...
* Fix arguments to various copyin()/copyout() invocations, to avoid
gratuitous casts.
* Some KNF formatting fixes
1996-12-22 10:21:06 +00:00
mycroft
7cbc74f45c
Use INFTIM, not -1.
1996-09-07 21:47:23 +00:00
mycroft
1449e67e30
Modify poll(2) prototype.
1996-09-07 14:20:09 +00:00
mycroft
2bc736661a
Implement poll(2).
1996-09-07 12:40:22 +00:00
mycroft
59f71c45fc
Clean up sys_select() slightly.
1996-09-05 15:32:52 +00:00
cgd
f41d0a3d9b
in select(), if it's a small number of file descriptors use a
...
automatic array rather than an array allocated with alloca().
(This was the only use of alloca() in the kernel, and it wasn't
necessary or consistent with the way other functions in this file
work.)
1996-06-13 05:08:47 +00:00
mycroft
abfbe7c6c4
Deal with FD_SETSIZE larger than the default.
1996-06-02 14:48:23 +00:00
cgd
f92325cf2f
kill unnecessary (and sometimes dangerous) casts of ioctl commands to int
1996-03-29 00:25:30 +00:00
christos
09afd77655
More proto fixes
1996-02-09 18:59:18 +00:00
christos
8a5b1b92e2
First pass at prototyping
1996-02-04 02:15:01 +00:00
mycroft
245f292fed
Prefix names of system call implementation functions with `sys_'.
1995-10-07 06:25:19 +00:00
thorpej
60024eb978
Make system calls conform to a standard prototype and bring those
...
prototypes into scope.
1995-09-19 21:40:36 +00:00
mycroft
f75ba16b09
Update to use timer{add,sub}().
1995-03-21 13:33:34 +00:00
mycroft
f9e259e3ca
Use __timer{add,sub}(), not timeval{add,sub}(). Remove the latter completely.
1994-12-11 18:06:07 +00:00
cgd
6ac2bbfc35
be more careful with types, also pull in headers where necessary.
1994-10-30 21:43:03 +00:00
cgd
6b86130410
update for new syscall args description mechanism
1994-10-20 04:22:35 +00:00
cgd
cf92afd66e
New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD'
1994-06-29 06:29:24 +00:00
cgd
ad7a66ca21
update to 4.4-lite
1994-05-19 06:39:46 +00:00
cgd
31596c7cad
setrun changes name
1994-05-07 00:56:46 +00:00
cgd
a0a7429482
lots of changes: prototype migration, move lots of variables, definitions,
...
and structure elements around. kill some unnecessary type and macro
definitions. standardize clock handling. More changes than you'd want.
1994-05-05 05:35:42 +00:00
cgd
4bbabd8e7a
Rename a lot of process flags.
1994-05-04 03:41:12 +00:00
pk
c90756358c
read(): return EINVAL if `count' argument is negative.
1994-02-16 17:23:03 +00:00
mycroft
21edb9924e
Canonicalize all #includes.
1993-12-18 03:59:02 +00:00
cgd
082beb9cc0
make args & locals of select unsigned where appropriate.
1993-07-15 22:26:11 +00:00
cgd
c0334ef92c
break args structs out, into syscallname_args structs, so gcc2 doesn't
...
whine so much.
1993-07-13 22:13:15 +00:00
glass
ac6d9dc22e
more damn ansi function declarations. damn you chris....
1993-06-22 01:59:39 +00:00
cgd
53eb1ac38c
a few changes to select. most notable: don't sleep forever unless
...
user actually wants to. (it could happen in strange circumstances...)
1993-06-14 05:11:58 +00:00
mycroft
85387a3dea
Believe it or not, selrecord() was broken...
1993-06-13 07:39:32 +00:00
cgd
8d6c77881c
make kernel select interface be one-stop shopping & clean it all up.
1993-05-18 18:18:40 +00:00
cgd
e541169ce2
after 0.2.2 "stable" patches applied
1993-03-21 18:04:42 +00:00
cgd
61f282557f
initial import of 386bsd-0.1 sources
1993-03-21 09:45:37 +00:00