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/sys/varsym.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  * SYS/VARSYM.H
    3  *
    4  *      Implements structures used for variant symlink support.
    5  * 
    6  * $DragonFly: src/sys/sys/varsym.h,v 1.7 2008/02/23 00:59:23 swildner Exp $
    7  */
    8 
    9 #ifndef _SYS_VARSYM_H_
   10 #define _SYS_VARSYM_H_
   11 
   12 #if defined(_KERNEL) || defined(_KERNEL_STRUCTURES)
   13 
   14 #ifndef _SYS_QUEUE_H_
   15 #include <sys/queue.h>          /* TAILQ_* macros */
   16 #endif
   17 
   18 #include <sys/lock.h>
   19 
   20 struct varsym {
   21     int         vs_refs;        /* a lot of sharing occurs */
   22     int         vs_namelen;
   23     char        *vs_name;       /* variable name */
   24     char        *vs_data;       /* variable contents */
   25 };
   26 
   27 typedef struct varsym   *varsym_t;
   28 
   29 struct varsyment {
   30     TAILQ_ENTRY(varsyment) ve_entry;
   31     varsym_t    ve_sym;
   32 };
   33 
   34 struct varsymset {
   35     TAILQ_HEAD(, varsyment) vx_queue;
   36     int         vx_setsize;
   37     struct lock vx_lock;
   38 };
   39 
   40 #endif  /* _KERNEL || _KERNEL_STRUCTURES */
   41 
   42 #define VARSYM_PROC     1
   43 #define VARSYM_USER     2
   44 #define VARSYM_SYS      3
   45 #define VARSYM_PRISON   4       /* used internally */
   46 
   47 #define VARSYM_PROC_MASK        (1 << VARSYM_PROC)
   48 #define VARSYM_USER_MASK        (1 << VARSYM_USER)
   49 #define VARSYM_SYS_MASK         (1 << VARSYM_SYS)
   50 #define VARSYM_ALL_MASK         (VARSYM_PROC_MASK|VARSYM_USER_MASK|VARSYM_SYS_MASK)
   51 
   52 #define MAXVARSYM_NAME  64
   53 #define MAXVARSYM_DATA  256
   54 #define MAXVARSYM_SET   16384
   55 
   56 #ifdef _KERNEL
   57 
   58 varsym_t varsymfind(int mask, const char *name, int namelen);
   59 int     varsymmake(int level, const char *name, const char *data);
   60 void    varsymdrop(varsym_t var);
   61 void    varsymset_init(struct varsymset *varsymset, struct varsymset *copy);
   62 void    varsymset_clean(struct varsymset *varsymset);
   63 int     varsymreplace(char *cp, int linklen, int maxlen);
   64 
   65 #endif  /* _KERNEL */
   66 
   67 #endif

Cache object: 1c9474b2e604d8b5a1e56979f5198e7b


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