Changeset 7:e5af94b04946 in freeDiameter for libfreeDiameter/sessions.c
- Timestamp:
- Sep 4, 2009, 6:05:25 PM (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libfreeDiameter/sessions.c
r6 r7 105 105 static struct { 106 106 struct fd_list sentinel; /* sentinel element for this sublist */ 107 pthread_mutex_t lock; /* the mutex for this sublist */107 pthread_mutex_t lock; /* the mutex for this sublist -- we might probably change it to rwlock for a little optimization */ 108 108 } sess_hash [ 1 << SESS_HASH_SIZE ] ; 109 109 #define H_MASK( __hash ) ((__hash) & (( 1 << SESS_HASH_SIZE ) - 1)) … … 113 113 /* The following are used to generate sid values that are eternaly unique */ 114 114 static uint32_t sid_h; /* initialized to the current time in fd_sess_init */ 115 static uint32_t sid_l; /* incremented each time a session id is created -- could use atomic operation probably*/115 static uint32_t sid_l; /* incremented each time a session id is created */ 116 116 static pthread_mutex_t sid_lock = PTHREAD_MUTEX_INITIALIZER; 117 117 … … 130 130 /********************************************************************************************************/ 131 131 132 /* Initialize a session object. It is not linked now. sid must be already alloc'ed. */132 /* Initialize a session object. It is not linked now. sid must be already malloc'ed. */ 133 133 static struct session * new_session(char * sid, size_t sidlen) 134 134 { … … 157 157 } 158 158 159 160 161 162 159 /* The expiry thread */ 163 160 static void * exp_fct(void * arg)
Note: See TracChangeset
for help on using the changeset viewer.