Commit Graph

118585 Commits

Author SHA1 Message Date
nyan
78a1e1e250 Remove unused functions. 2005-09-13 11:34:07 +00:00
nyan
626cc8f32a Remove EPSON_NRDISK support. 2005-09-13 11:33:25 +00:00
rwatson
afc7b6e916 As a result of kqueue locking work, socket buffer locks will always
be held when entering a kqueue filter for fifos via a socket buffer
event: as such, assert the lock unconditionally rather than acquiring
it conditionall.

MFC after:	3 days
2005-09-13 10:39:24 +00:00
rwatson
5dc127c9e2 Remove a debugging printf. 2005-09-13 10:33:32 +00:00
yongari
d338b8238b Unlock driver lock before calling resource_int_value(9).
This should fix LOR(in fact it's not LOR) in device attach.
2005-09-13 10:12:28 +00:00
rwatson
2bda369cf8 Annotate two issues:
1) fifo_kqfilter() is not actually ever used, it likely should be GC'd.

2) fifo_kqfilter_f() doesn't implement EVFILT_VNODE, so detecting events
   on the underlying vnode for a fifo no longer works (it did in 4.x).
   Likely, fifo_kqfilter_f() should forward the request to the VFS using
   fp->f_vnode, which would work once fifo_kqfilter() was detached from
   the vnode operation vector (removing the fifo override).

Discussed with:	phk
2005-09-13 09:23:22 +00:00
nyan
75a715050f MFi386: revision 1.11. 2005-09-13 08:29:03 +00:00
nyan
58bbddf5e1 MFi386: revisions 1.10 and 1.11.
- Add '-mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3' to CFLAGS.
2005-09-13 08:27:38 +00:00
jkoshy
14b399b103 Fix a bug that caused generated gmon.out profiles to be out of
whack.  Use saturating arithmetic when incrementing a bucket.
Improve a few comments.

MFC after:	3 days
2005-09-13 02:23:25 +00:00
das
665ea151e9 Add a missing ldexpf() alias for amd64.
Noticed by:	bz@, tjr@
2005-09-12 20:54:00 +00:00
rwatson
bc5e7eb1f3 Introduce no-op nosup fifo kqueue filter and detach routine, which are
used when a read filter is requested on a write-only fifo descriptor, or
a write filter is requested on a read-only fifo descriptor.  This
permits the filters to be registered, but never raises the event, which
causes kqueue behavior for fifos to more closely match similar semantics
for poll and select, which permit testing for the condition even though
the condition will never be raised, and is consistent with POSIX's notion
that a fifo has identical semantics to a one-way IPC channel created
using pipe() on most operating systems.

The fifo regression test suite can now run to completion on HEAD without
errors.

MFC after:	3 days
2005-09-12 19:59:12 +00:00
stefanf
f9e069084c Include a couple of headers to ensure consistency between the prototype and
the function definition.
2005-09-12 19:52:42 +00:00
rwatson
3e75d8f4fd Comment test_lseek().
Add test_kqueue(), which registers and unregisters various kqueue filter
types on a fifo in order to make sure that EVFILT_READ, EVFILT_WRITE can
be registered, and that EVFILT_NETDEV can't be registered.  For now, we
don't test that EVFILT_VNODE can be registered on fifos, as that has been
broken at some point.
2005-09-12 19:31:16 +00:00
rwatson
7a24bd139f In netkqfilter(), return EINVAL instead of 1 (EPERM) when a filter type
is requested on a network interface file descriptor that is non-applicable.

MFC after:	3 days
2005-09-12 19:26:03 +00:00
rwatson
f2fa5d310d In vfs_kqfilter(), return EINVAL instead of 1 (EPERM) when an unsupported
kqueue filter type is requested on a vnode.

MFC after:	3 days
2005-09-12 19:22:37 +00:00
netchild
9986ff6dc1 - Fix the locking in dsp.c to prevent a LOR (AFAIK not on the LOR page).
- Remove an assertion in sound.c, it's not needed (and causes a panic now).
  From the conversation via mail between glebius and Ariff:
  ---snip---
  > Well, but which mutex protects now? Do we own anything else
  > in pcm_chnalloc()? I see some queue(4) macros in pcm_chnalloc(),
  > they should be protected, shouldn't they?
  Queue insertion/removal occur during
     1) driver loading (which is pretty much single thread /
        sequential) or unloading (mutex protected, bail out if there is
        any channel with refcount > 0 or busy).
     2) vchan_create()/destroy(), (which is *sigh* quite complicated), but
        somehow protected by 'master'/parent channel mutex. Other
        thread cannot add/remove vchan (or even continue traversing
        that queue) unless it can acquire parent channel mutex.
---snip---

Fix the locking in dsp.c to prevent a LOR (AFAIK not on the LOR page).

Submitted by:	Ariff Abdullah <skywizard@MyBSD.org.my>
Tested with:	INVARIANTS[1] and DIAGNOSTICS[2]
Tested by:	netchild [1,2], David Reid <david@jetnet.co.uk> [1]
2005-09-12 18:33:33 +00:00
rwatson
491de3e2d2 When a request is made to register a filter on a fifo that doesn't
apply to the fifo (i.e., not EVFILT_READ or EVFILT_WRITE), reject
it as EINVAL, not by returning 1 (EPERM).

MFC after:	3 days
2005-09-12 18:07:49 +00:00
rwatson
1149df53b0 Further updates to fifo_io regression test:
- Teach fifo_io about kqueue monitoring of fifo file descriptor status,
  and add test cases for kqueue to match existing case for poll and
  select.  Add a new cleanup routine, cleanfifokq(), for use in tests that
  use kqueues.  kqueue_setup() sets up kqueue sessions, and kqueue_status()
  returns file descriptor status.

- Correct a bug in select handling relating to the nfds argument, which
  was incorrect so resulted in select occuring on the wrong file descriptor,
  and possible false positive/negative results.

- Clarify error reporting in one byte write+read tests to distinguish
  errors in the after case from the before case.
2005-09-12 17:05:48 +00:00
stefanf
7368122bb1 - Add prototypes for __cmpdi2() and __ucmpdi2().
- Remove GCC 1 stuff.
2005-09-12 16:16:12 +00:00
stefanf
2e4788713c Put a getosreldate() prototype into <osreldate.h>, getosreldate(3) implies
there is one.
2005-09-12 16:11:48 +00:00
stefanf
698cbc6a4d Include <osreldate.h> at the top of the file. 2005-09-12 16:06:15 +00:00
stefanf
fa7406b7f9 Use prototypes for CHIN1() and CHIN(). 2005-09-12 16:02:54 +00:00
stefanf
174f336d2e Fix the prototypes for devname() and devname_r(), the first two argument
types are supposed to be dev_t and mode_t (prefixed with __ due to
namespace reasons).
2005-09-12 15:58:15 +00:00
jkoshy
0d46d23897 Process one NMI interrupt per handler invocation as the processor
'buffers' pending NMIs from multiple interrupting PMCs and delivers
them serially.

Reported by:	 Olivier Crameri <olivier.crameri@epfl.ch>
MFC after:	3 days
2005-09-12 15:55:44 +00:00
stefanf
871b20e6ea Don't declare ___res_ext() twice. 2005-09-12 15:53:28 +00:00
jkim
57e4878685 use monotonic time_uptime' instead of time_second'
Approved by:	anholt (mentor)
Discussed on:	arch
2005-09-12 15:31:28 +00:00
le
6675921351 Clean up.
Remove unused functions.

Reduce indentation level by reverting the logic of the enclosing
conditional statement.
2005-09-12 14:31:49 +00:00
maxim
6732fe0718 o Add shutdown(2) regression tests. At the moment we cannot pass
shutdown-on-non connected socket test, kern/84761.
2005-09-12 14:12:09 +00:00
glebius
67f869b35c When message can't fit into socket receive buffer return ENOBUFS
to userland program instead of letting it wait until end of days.

PR:	kern/85907
2005-09-12 14:11:11 +00:00
nyan
9bf49882e6 opt_pc98.h is not needed. 2005-09-12 13:50:56 +00:00
stefanf
56b9efc0f3 Move the declaration of __cleanup to libc_private.h as it is used in both
stdio/ and stdlib/.  Don't define __cleanup twice.
2005-09-12 13:46:32 +00:00
nyan
a4b72ef040 more #ifndef PC98. This really fix the pc98 tinderbox. 2005-09-12 13:40:10 +00:00
kensmith
61c7b121b1 Update for RELENG_6.
Pointed out by:	Many on current@.
MFC after:	1 day
2005-09-12 13:31:33 +00:00
rwatson
6b308e01a1 Remove DFLAG_SEEKABLE from fifo file descriptors: fifos are not seekable
according to POSIX, not to mention the fact that it doesn't make sense
(and hence isn't really implemented).  This causes the fifo_misc
regression test to succeed.
2005-09-12 12:15:12 +00:00
rwatson
bc20141649 Add fifo_misc, a regression test to hold misc. functional tests for fifos
that don't obviously fit into create, open, and io.  For now, add only a
regression test to make sure that lseek() fails with ESPIPE (which it
doesn't).
2005-09-12 11:58:14 +00:00
rwatson
4bf620706a Use different temporary directory templates for fifo_io and fifo_open so
that if the tests fail to GC their working spaces, it's clear which it is.
2005-09-12 11:43:51 +00:00
brian
9496bf8e94 Remove this file as it's mostly out of date. Up-to-date info such as
the program's origin is already in the man page.

Update requested by:	Xavier Venient & Jason McIntyre
2005-09-12 11:20:07 +00:00
rwatson
1481446aae Only poll the fifo for read events if the fifo is attached to a readable
file descriptor.  Otherwise, the read end of a fifo might return that it
is writable (which it isn't).

Only poll the fifo for write events if the fifo attached to a writable
file descriptor.  Otherwise, the write end of a fifo might return that
it is readable (which it isn't).

In the event that a file is FREAD|FWRITE (which is allowed by POSIX, but
has undefined behavior), we poll for both.

MFC after:	3 days
2005-09-12 10:16:18 +00:00
rwatson
919d519cbb After going to some trouble to identify only the write-related events
to poll the write socket for, the fifo polling code proceeded to poll
for the complete set of events.  Use 'levents' instead of 'events' as
the argument to poll, and only poll the write socket if there is
interest in write events.

MFC after:	3 days
2005-09-12 10:13:15 +00:00
rwatson
5be69d1d56 When a writer opens a fifo, wake up the read socket for read, not the
write socket.

MFC after:	3 days
2005-09-12 10:07:21 +00:00
rwatson
c9f007b159 Add an assertion that fifo_open() doesn't race against other threads
while sleeping to allocate fifo state: due to using the vnode lock to
serialize access to a fifo during open, it shouldn't happen (tm).

MFC after:	3 days
2005-09-12 10:06:38 +00:00
rwatson
a079789c36 Rather than reaching into the internals of the UNIX domain socket code
by calling uipc_connect2() to connect two socket endpoints to create a
fifo, call soconnect2().

MFC after:	3 days
2005-09-12 10:05:08 +00:00
rwatson
073fb90c59 Add fifo_io, a regression test for I/O operations on POSIX fifos. We
currently can't pass this regression test due to broken poll() and
select() support for fifos, but past the basic I/O operation tests.
2005-09-12 09:42:29 +00:00
phk
4e50b9ebd8 Introduce vfs_read_dirent() which can help VOP_READDIR() implementations
by handling all the cookie stuff.
2005-09-12 08:46:07 +00:00
phk
aca041ee53 Clean up prototypes. 2005-09-12 08:03:15 +00:00
glebius
e05f61f30d Remove ng_callout_init_mtx() macro. Mutexed callouts are incompatible
with netgraph(4).
2005-09-12 07:41:31 +00:00
imp
b939d57c24 This appears to be good for some folks, but really bad for others.
Until we know why, back out 1.127.
2005-09-12 05:35:11 +00:00
imp
3f6701edb2 Since opti_detect is now only called on !PC98 machines, only declare
and define there as well.  This should fix the pc98 tinderbox.
2005-09-12 04:12:50 +00:00
obrien
4c95069237 MFamd64: use register_t's. 2005-09-12 03:34:05 +00:00
obrien
4bbda4e49b Note that Keyspan is also InnoSys Inc. 2005-09-12 03:32:46 +00:00