OpenSS7 SS7 for the Common Man |
© Copyright 1997-2004,OpenSS7 Corporation, All Rights Reserved. |
||||||||||||||||||||||||||
Home | Overview | Status | News | Documentation | Resources | About | |||||||||||||||||||||
File /code/strss7/drivers/priv.h#ifndef __PRIV_H__ #define __PRIV_H__ /* * ========================================================================= * * Private Data Structures * * ========================================================================= */ /* list linkage */ #define HEAD_DECLARATION(__type) \ __type *next; /* link linkage */ \ __type **prev; /* link linkage */ \ atomic_t refcnt; /* reference count */ \ lis_spin_lock_t lock; /* structure lock */ \ void (*put)(__type *); /* release function */ \ __type *(*get)(__type *); /* acquire function */ \ ulong type; /* structure type */ \ ulong id; /* structure id */ \ ulong state; /* state */ \ ulong flags; /* flags */ \ typedef struct head { HEAD_DECLARATION (struct head); /* head declaration */ } head_t; /* stream related structures */ #define STR_DECLARATION(__type) \ HEAD_DECLARATION(__type); /* link linkage */ \ union { \ struct { \ ushort cmajor; /* device major */ \ ushort cminor; /* device minor */ \ } dev; \ struct { \ ulong index; /* linked index */ \ } mux; \ } u; \ cred_t cred; /* credential */ \ queue_t *iq; /* iput queue */ \ queue_t *oq; /* oput queue */ \ int (*i_prim)(queue_t *, mblk_t *); /* iput function */ \ int (*o_prim)(queue_t *, mblk_t *); /* oput function */ \ void (*i_wakeup)(queue_t *); /* isrv wakeup function */ \ void (*o_wakeup)(queue_t *); /* osrv wakeup function */ \ lis_spin_lock_t qlock; /* queue lock */ \ uint ibid; /* iput bufcall id */ \ uint obid; /* oput bufcall id */ \ queue_t *iwait; /* iput queue waiting */ \ queue_t *owait; /* oput queue waiting */ \ ulong i_state; /* interface state */ \ ulong i_style; /* interface style */ \ ulong i_version; /* interface version */ \ ulong i_oldstate; /* previous state */ \ /* generic stream structure */ typedef struct str { STR_DECLARATION (struct str); /* stream declaration */ } str_t; #define STR_PRIV(__q)((str_t *)(__q)->q_ptr) /* generic linkage */ #define SLIST_LINKAGE(__s1, __s2, __s3) \ struct { \ struct __s1 *__s1; \ struct __s2 *next; \ struct __s2 **prev; \ } __s3 \ #define SLIST_HEAD(__s1, __s2) \ struct { \ size_t numb; \ struct __s1 *list; \ } __s2 \ #define SLIST_HASH(__s1, __s2, __n) \ struct { \ size_t numb; \ struct __s1 *hash[__n]; \ } __s2 \ #endif /* __PRIV_H__ */
|
|||||||||||||||||||||||||||
OpenSS7 SS7 for the Common Man |
Home | Overview | Status | News | Documentation | Resources | About | ||||||||||||||||||||
© Copyright 1997-2004,OpenSS7 Corporation, All Rights Reserved. |