| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Rename klist_{insert,remove}() to klist_{insert,remove}_locked().
These functions assume that the caller has locked the klist. The current
state of locking remains intact because the kernel lock is still used
with all klists.
Add new functions klist_insert() and klist_remove() that lock the klist
internally. This allows some code simplification.
OK mpi@
|
|
|
|
|
|
| |
for example, with locking assertions.
OK mpi@, anton@
|
|
|
|
|
|
| |
adding more filter properties without cluttering the struct.
OK mpi@, anton@
|
|
|
|
|
|
| |
make the structs const so that the data are put in .rodata.
OK mpi@, deraadt@, anton@, bluhm@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are straightforward except for the tsleep(9) conversion. ratchov@
had a bit to say about that code:
https://marc.info/?l=openbsd-tech&m=157665936017373&w=2
> The problem is that close(2) may reset the transmitter before the few
> bytes of its internal buffer is sent on the wire; there's no "wait for
> completion" feature in such simple hardware, so we just wait few
> milliseconds.
>
> The transmitter buffer size is around 16 bytes, the byte rate is 3125
> bytes/second. So if we wait at least 16B / 3125B/s = 5.12ms, we're
> safe. Waiting 10ms-20ms is enough and is unnoticeable.
Hence, in this diff we wait a flat 20ms in that situation.
ok ratchov@
|
|
|
|
|
|
|
|
|
|
| |
the preferred method to access MIDI hardware is through sndiod(8) which
doesn't use it.
Fixes a potential issue with a stale struct proc pointer found by Ilja van
Sprundel.
ok deraadt@, ratchov@
|
| |
|
|
|
|
|
| |
factor calls to mtx_leave() before returning. From Michael
W. Bombardieri <mb at ii.net>. Thanks!
|
|
|
|
| |
ok ratchov@
|
|
|
|
|
|
|
|
| |
maintaining a "dying" flag which is already present in the device
structure. As a side-effect, this adds the missing refcounting
that mididetach() was missing. With from mpi@ and dlg@
ok mpi
|
|
|
|
| |
same information.
|
| |
|
|
|
|
|
| |
midi_getinfo(), midi_writebytes(). They were "used" by the sequencer
interface which we removed years ago.
|
|
|
|
| |
may sleep in case of a page fault
|
|
|
|
|
|
|
| |
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.
ok tedu@ deraadt@
|
|
|
|
|
|
|
| |
- rename uiomove() to uiomovei() and update all its users.
- introduce uiomove(), which is similar to uiomovei() but with a size_t.
- rewrite uiomovei() as an uiomove() wrapper.
ok kettenis@
|
| |
|
|
|
|
| |
ok mpi@ kspillner@
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
structures (including sound-card registers) from concurent
access by syscall and interrupt code-paths. Since critical
sections remain the same, calls to splraise/spllower can be
safely replaced by calls to mtx_enter/mtx_leave with two
exceptions: (1) mutexes are not reentrant (the inner splraise
is thus removed), and (2) we're not allowed to sleep with a
mutex (either msleep is used or the mutex is released before
sleeping).
ok and help from kettenis, a lot of work from armani
|
|
|
|
|
| |
mostly from armani.
ok miod, mpi, jsg and help from sthen
|
|
|
|
|
|
| |
obviously can occur after the transfer complete. In this case, don't
print a warning (if MIDI_DEBUG defined) and don't attempt to stop the
transfer twice.
|
|
|
|
|
|
|
| |
just return and make the midi(4) driver retry later. UART buffers
are large enough for this, except eap(4) which uses interrupts for
output.
help from and ok jsg@
|
|
|
|
|
|
| |
the obvious cases to return EINVAL and ENXIO.
ok tedu deraadt
|
|
|
|
|
| |
a signal (like SIGALRM) may cause the output buffer to not be drained
and causing for instance stale notes.
|
| |
|
|
|
|
|
|
|
|
|
| |
#include "foo.h"
#if NFOO > 0
(whole file)
#endif
since config(8) file inclusion rules already do it for you.
ok deraadt@
|
| |
|
|
|
|
|
|
|
|
|
|
| |
supported it doesn't do any harm), so put the KNOTE() in selwakeup() itself and
remove it from any occurences where both are used, except one for kqueue itself
and one in sys_pipe.c (where the selwakeup is under a PIPE_SEL flag).
Based on a diff from tedu.
ok deraadt
|
|
|
|
| |
ok ratchov
|
|
|
|
| |
ok ratchov
|
|
|
|
| |
suggested by jsg@
|
|
|
|
|
|
| |
entry is missing in cdevsw[], in which case vdevgone() is called
with out of bounds argument.
requested by dlg@
|
| |
|
|
|
|
| |
from alexandre ratchov. ok claudio
|
|
|
|
|
|
|
| |
It is only necessary to notify reading processes when the buffer is
empty rather than on every input byte.
From Alexandre Ratchov.
|
|
|
|
|
|
|
| |
Allow umidi(4) to send multiple events in a single USB transfer.
This greatly improves the number of interrupts umidi is able to generate.
From Alexandre Ratchov.
|
|
|
|
|
|
| |
not support interrupts on output, from writing blocks larger than
MIDI_MAXWRITE bytes. tested on both kinds of devices
from alex-contact@caoua.org
|
| |
|
| |
|
|
|
|
|
|
|
| |
now call the poll backend. With this change we implement greater
poll(2) functionality instead of emulating it via the select backend.
Adapted from NetBSD and including some changes from FreeBSD.
Tested by many, deraadt@ OK
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
from NetBSD/Lennart Augustsson. (niklas@ ok)
|
|
|
|
| |
speaker only systems.
|
| |
|
|
|