Deleted Added
full compact
twevar.h (69543) twevar.h (76340)
1/*-
2 * Copyright (c) 2000 Michael Smith
3 * Copyright (c) 2000 BSDi
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
1/*-
2 * Copyright (c) 2000 Michael Smith
3 * Copyright (c) 2000 BSDi
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 * $FreeBSD: head/sys/dev/twe/twevar.h 69543 2000-12-03 02:11:35Z msmith $
27 * $FreeBSD: head/sys/dev/twe/twevar.h 76340 2001-05-07 21:46:44Z msmith $
28 */
29
30#ifdef TWE_DEBUG
31#define debug(level, fmt, args...) \
32 do { \
33 if (level <= TWE_DEBUG) printf("%s: " fmt "\n", __FUNCTION__ , ##args); \
34 } while(0)
35#define debug_called(level) \

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

235static __inline void
236twe_initq_bio(struct twe_softc *sc)
237{
238 TWE_BIO_QINIT(sc->twe_bioq);
239 TWEQ_INIT(sc, TWEQ_BIO);
240}
241
242static __inline void
28 */
29
30#ifdef TWE_DEBUG
31#define debug(level, fmt, args...) \
32 do { \
33 if (level <= TWE_DEBUG) printf("%s: " fmt "\n", __FUNCTION__ , ##args); \
34 } while(0)
35#define debug_called(level) \

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

235static __inline void
236twe_initq_bio(struct twe_softc *sc)
237{
238 TWE_BIO_QINIT(sc->twe_bioq);
239 TWEQ_INIT(sc, TWEQ_BIO);
240}
241
242static __inline void
243twe_enqueue_bio(struct twe_softc *sc, struct bio *bp)
243twe_enqueue_bio(struct twe_softc *sc, twe_bio *bp)
244{
245 int s;
246
247 s = splbio();
248 TWE_BIO_QINSERT(sc->twe_bioq, bp);
249 TWEQ_ADD(sc, TWEQ_BIO);
250 splx(s);
251}
252
244{
245 int s;
246
247 s = splbio();
248 TWE_BIO_QINSERT(sc->twe_bioq, bp);
249 TWEQ_ADD(sc, TWEQ_BIO);
250 splx(s);
251}
252
253static __inline struct bio *
253static __inline twe_bio *
254twe_dequeue_bio(struct twe_softc *sc)
255{
256 int s;
254twe_dequeue_bio(struct twe_softc *sc)
255{
256 int s;
257 struct bio *bp;
257 twe_bio *bp;
258
259 s = splbio();
260 if ((bp = TWE_BIO_QFIRST(sc->twe_bioq)) != NULL) {
261 TWE_BIO_QREMOVE(sc->twe_bioq, bp);
262 TWEQ_REMOVE(sc, TWEQ_BIO);
263 }
264 splx(s);
265 return(bp);
266}
258
259 s = splbio();
260 if ((bp = TWE_BIO_QFIRST(sc->twe_bioq)) != NULL) {
261 TWE_BIO_QREMOVE(sc->twe_bioq, bp);
262 TWEQ_REMOVE(sc, TWEQ_BIO);
263 }
264 splx(s);
265 return(bp);
266}