Page MenuHomeFreeBSD

sound: Adjust mmap example to use kqueue
ClosedPublic

Authored by meka_tilda.center on Wed, Jun 3, 3:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jun 24, 9:50 PM
Unknown Object (File)
Tue, Jun 23, 3:45 PM
Unknown Object (File)
Mon, Jun 22, 4:30 AM
Unknown Object (File)
Sun, Jun 21, 11:00 PM
Unknown Object (File)
Sat, Jun 20, 8:31 AM
Unknown Object (File)
Thu, Jun 18, 3:14 PM
Unknown Object (File)
Thu, Jun 18, 2:12 PM
Unknown Object (File)
Thu, Jun 18, 2:12 PM
Subscribers

Details

Summary

With D57362 mmap is much easier and efficient to handle using kqueue, so mmap.c is change to reflect that.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

meka_tilda.center updated this revision to Diff 179137.

In previous patch I acidently included kernel and map page patch, so this is a clean one.

share/examples/sound/mmap.c
40–41

Are all these needed here?

92

Can't we just re-use ev?

175

Should these be errx()s or warnx()s? In other words, are these fatal errors?

182–183
meka_tilda.center added inline comments.
share/examples/sound/mmap.c
175

If ptr is out of bounds, it's a bug and we should bail out. Same goes for frame_size, which is sample_size * channels. If ptr is not multiple of frame_size, that means we're somewhere in the middle of the frame or even worse, middle of a sample. That's also a bug and we should bail out.

meka_tilda.center marked an inline comment as done.

Forgot one of the comments.

This revision is now accepted and ready to land.Mon, Jun 15, 2:32 PM
This revision was automatically updated to reflect the committed changes.