Deleted Added
full compact
midi.c (193979) midi.c (194990)
1/*-
2 * Copyright (c) 2003 Mathew Kanner
3 * Copyright (c) 1998 The NetBSD Foundation, Inc.
4 * All rights reserved.
5 *
6 * This code is derived from software contributed to The NetBSD Foundation
7 * by Lennart Augustsson (augustss@netbsd.org).
8 *

--- 21 unchanged lines hidden (view full) ---

30
31 /*
32 * Parts of this file started out as NetBSD: midi.c 1.31
33 * They are mostly gone. Still the most obvious will be the state
34 * machine midi_in
35 */
36
37#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2003 Mathew Kanner
3 * Copyright (c) 1998 The NetBSD Foundation, Inc.
4 * All rights reserved.
5 *
6 * This code is derived from software contributed to The NetBSD Foundation
7 * by Lennart Augustsson (augustss@netbsd.org).
8 *

--- 21 unchanged lines hidden (view full) ---

30
31 /*
32 * Parts of this file started out as NetBSD: midi.c 1.31
33 * They are mostly gone. Still the most obvious will be the state
34 * machine midi_in
35 */
36
37#include <sys/cdefs.h>
38__FBSDID("$FreeBSD: head/sys/dev/sound/midi/midi.c 193979 2009-06-11 09:06:09Z ariff $");
38__FBSDID("$FreeBSD: head/sys/dev/sound/midi/midi.c 194990 2009-06-25 18:46:30Z kib $");
39
40#include <sys/param.h>
41#include <sys/queue.h>
42#include <sys/kernel.h>
43#include <sys/lock.h>
44#include <sys/mutex.h>
45#include <sys/proc.h>
46#include <sys/signalvar.h>

--- 800 unchanged lines hidden (view full) ---

847 }
848
849 /*
850 * We are certain than data can be placed on the queue
851 */
852
853 used = MIN(MIDIQ_AVAIL(m->outq), uio->uio_resid);
854 used = MIN(used, MIDI_WSIZE);
39
40#include <sys/param.h>
41#include <sys/queue.h>
42#include <sys/kernel.h>
43#include <sys/lock.h>
44#include <sys/mutex.h>
45#include <sys/proc.h>
46#include <sys/signalvar.h>

--- 800 unchanged lines hidden (view full) ---

847 }
848
849 /*
850 * We are certain than data can be placed on the queue
851 */
852
853 used = MIN(MIDIQ_AVAIL(m->outq), uio->uio_resid);
854 used = MIN(used, MIDI_WSIZE);
855 MIDI_DEBUG(5, printf("midiout: resid %d len %jd avail %jd\n",
855 MIDI_DEBUG(5, printf("midiout: resid %zd len %jd avail %jd\n",
856 uio->uio_resid, (intmax_t)MIDIQ_LEN(m->outq),
857 (intmax_t)MIDIQ_AVAIL(m->outq)));
858
859
860 MIDI_DEBUG(5, printf("midi_write: uiomove cc=%d\n", used));
861 retval = uiomove(buf, used, uio);
862 if (retval)
863 goto err1;

--- 668 unchanged lines hidden ---
856 uio->uio_resid, (intmax_t)MIDIQ_LEN(m->outq),
857 (intmax_t)MIDIQ_AVAIL(m->outq)));
858
859
860 MIDI_DEBUG(5, printf("midi_write: uiomove cc=%d\n", used));
861 retval = uiomove(buf, used, uio);
862 if (retval)
863 goto err1;

--- 668 unchanged lines hidden ---