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/netatalk/ddp_pcb.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 /*-
    2  * Copyright (c) 2004 Robert N. M. Watson
    3  * Copyright (c) 1990,1994 Regents of The University of Michigan.
    4  * All Rights Reserved.
    5  *
    6  * Permission to use, copy, modify, and distribute this software and
    7  * its documentation for any purpose and without fee is hereby granted,
    8  * provided that the above copyright notice appears in all copies and
    9  * that both that copyright notice and this permission notice appear
   10  * in supporting documentation, and that the name of The University
   11  * of Michigan not be used in advertising or publicity pertaining to
   12  * distribution of the software without specific, written prior
   13  * permission. This software is supplied as is without expressed or
   14  * implied warranties of any kind.
   15  *
   16  * This product includes software developed by the University of
   17  * California, Berkeley and its contributors.
   18  *
   19  *      Research Systems Unix Group
   20  *      The University of Michigan
   21  *      c/o Wesley Craig
   22  *      535 W. William Street
   23  *      Ann Arbor, Michigan
   24  *      +1-313-764-2278
   25  *      netatalk@umich.edu
   26  *
   27  * $FreeBSD: src/sys/netatalk/ddp_pcb.h,v 1.2.2.1 2005/01/31 23:26:25 imp Exp $
   28  */
   29 
   30 #ifndef _NETATALK_DDP_PCB_H_
   31 #define _NETATALK_DDP_PCB_H_
   32 
   33 int     at_pcballoc(struct socket *so);
   34 int     at_pcbconnect(struct ddpcb *ddp, struct sockaddr *addr, 
   35             struct thread *td);
   36 void    at_pcbdetach(struct socket *so, struct ddpcb *ddp);
   37 void    at_pcbdisconnect(struct ddpcb *ddp);
   38 int     at_pcbsetaddr(struct ddpcb *ddp, struct sockaddr *addr,
   39             struct thread *td);
   40 void    at_sockaddr(struct ddpcb *ddp, struct sockaddr **addr);
   41 
   42 /* Lock macros for per-pcb locks. */
   43 #define DDP_LOCK_INIT(ddp)      mtx_init(&(ddp)->ddp_mtx, "ddp_mtx",    \
   44                                     NULL, MTX_DEF)
   45 #define DDP_LOCK_DESTROY(ddp)   mtx_destroy(&(ddp)->ddp_mtx)
   46 #define DDP_LOCK(ddp)           mtx_lock(&(ddp)->ddp_mtx)
   47 #define DDP_UNLOCK(ddp)         mtx_unlock(&(ddp)->ddp_mtx)
   48 #define DDP_LOCK_ASSERT(ddp)    mtx_assert(&(ddp)->ddp_mtx, MA_OWNED)
   49 
   50 /* Lock macros for global pcb list lock. */
   51 #define DDP_LIST_LOCK_INIT()    mtx_init(&ddp_list_mtx, "ddp_list_mtx", \
   52                                     NULL, MTX_DEF)
   53 #define DDP_LIST_LOCK_DESTROY() mtx_destroy(&ddp_list_mtx)
   54 #define DDP_LIST_XLOCK()        mtx_lock(&ddp_list_mtx)
   55 #define DDP_LIST_XUNLOCK()      mtx_unlock(&ddp_list_mtx)
   56 #define DDP_LIST_XLOCK_ASSERT() mtx_assert(&ddp_list_mtx, MA_OWNED)
   57 #define DDP_LIST_SLOCK()        mtx_lock(&ddp_list_mtx)
   58 #define DDP_LIST_SUNLOCK()      mtx_unlock(&ddp_list_mtx)
   59 #define DDP_LIST_SLOCK_ASSERT() mtx_assert(&ddp_list_mtx, MA_OWNED)
   60 
   61 #endif

Cache object: 5578fac323220824308498586d6e5500


[ 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.