The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dev/bktr/bktr_os.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /* $FreeBSD$ */
    2 
    3 /*
    4  * This is part of the Driver for Video Capture Cards (Frame grabbers)
    5  * and TV Tuner cards using the Brooktree Bt848, Bt848A, Bt849A, Bt878, Bt879
    6  * chipset.
    7  * Copyright Roger Hardiman and Amancio Hasty.
    8  *
    9  * bktr_os : This has all the Operating System dependant code.
   10  *
   11  */
   12 
   13 /*-
   14  * 1. Redistributions of source code must retain the 
   15  * Copyright (c) 1997 Amancio Hasty, 1999 Roger Hardiman
   16  * All rights reserved.
   17  *
   18  * Redistribution and use in source and binary forms, with or without
   19  * modification, are permitted provided that the following conditions
   20  * are met:
   21  * 1. Redistributions of source code must retain the above copyright
   22  *    notice, this list of conditions and the following disclaimer.
   23  * 2. Redistributions in binary form must reproduce the above copyright
   24  *    notice, this list of conditions and the following disclaimer in the
   25  *    documentation and/or other materials provided with the distribution.
   26  * 3. All advertising materials mentioning features or use of this software
   27  *    must display the following acknowledgement:
   28  *      This product includes software developed by Amancio Hasty and
   29  *      Roger Hardiman
   30  * 4. The name of the author may not be used to endorse or promote products 
   31  *    derived from this software without specific prior written permission.
   32  *
   33  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
   34  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
   35  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   36  * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
   37  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
   38  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
   39  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   40  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
   41  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
   42  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   43  * POSSIBILITY OF SUCH DAMAGE.
   44  */
   45 
   46 
   47 /******************************/
   48 /* *** Memory Allocation  *** */
   49 /******************************/
   50 #if (defined(__FreeBSD__) || defined(__bsdi__))
   51 vm_offset_t     get_bktr_mem( int unit, unsigned size );
   52 #endif
   53 
   54 #if (defined(__NetBSD__) || defined(__OpenBSD__))
   55 vm_offset_t     get_bktr_mem(bktr_ptr_t, bus_dmamap_t *, unsigned size);
   56 void            free_bktr_mem(bktr_ptr_t, bus_dmamap_t, vm_offset_t);
   57 #endif 
   58 
   59 /************************************/
   60 /* *** Interrupt Enable/Disable *** */
   61 /************************************/
   62 #if defined(__FreeBSD__)
   63 #if (__FreeBSD_version >=500000)
   64 #define USE_VBIMUTEX
   65 #define DECLARE_INTR_MASK(s)    /* no need to declare 's' */
   66 #define DISABLE_INTR(s)
   67 #define ENABLE_INTR(s)
   68 #else
   69 #define DECLARE_INTR_MASK(s)    intrmask_t s
   70 #define DISABLE_INTR(s)         s=spltty()
   71 #define ENABLE_INTR(s)          splx(s)
   72 #endif
   73 #else
   74 #define DECLARE_INTR_MASK(s)    /* no need to declare 's' */
   75 #define DISABLE_INTR(s)         disable_intr()
   76 #define ENABLE_INTR(s)          enable_intr()
   77 #endif
   78 
   79 #ifdef USE_VBIMUTEX
   80 #define LOCK_VBI(bktr)          mtx_lock(&bktr->vbimutex)
   81 #define UNLOCK_VBI(bktr)        mtx_unlock(&bktr->vbimutex)
   82 #else
   83 #define LOCK_VBI(bktr)
   84 #define UNLOCK_VBI(bktr)
   85 #endif

Cache object: afaae4d303454f0ed702f5d009893916


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.