Lines Matching refs:session

34  *    searching each session object list for matching objects.
58 * by the session manager.
104 * successful, a write-lock on the session will be held to indicate
109 meta_handle2session(CK_SESSION_HANDLE hSession, meta_session_t **session)
125 /* Make sure this session is not in the process of being deleted */
135 *session = tmp_session;
144 meta_session_alloc(meta_session_t **session)
148 /* Allocate memory for the session. */
166 *session = new_session;
174 * Create and add a session to the list of active meta sessions.
177 meta_session_activate(meta_session_t *session)
181 /* Add session to the list of sessions. */
183 INSERT_INTO_LIST(meta_sessionlist_head, session);
195 meta_session_deactivate(meta_session_t *session,
202 (void) pthread_mutex_lock(&session->isClosingSession_lock);
203 if (session->isClosingSession) {
205 (void) pthread_mutex_unlock(&session->isClosingSession_lock);
206 REFRELEASE(session);
209 session->isClosingSession = B_TRUE;
210 session->magic_marker = METASLOT_SESSION_BADMAGIC;
211 (void) pthread_mutex_unlock(&session->isClosingSession_lock);
214 * Remove session from the session list. Once removed, it will not
215 * be possible for another thread to begin using the session.
222 REMOVE_FROM_LIST(meta_sessionlist_head, session);
231 (void) pthread_rwlock_unlock(&session->session_lock);
234 if (session->op1.type != 0) {
235 meta_operation_cleanup(session, session->op1.type, FALSE);
238 if (session->op1.session != NULL) {
239 meta_release_slot_session(session->op1.session);
240 session->op1.session = NULL;
243 /* Remove all the session metaobjects created in this session. */
245 while ((object = session->object_list_head) != NULL) {
271 session->session_flags);
299 * Release the resources held by a metasession. If the session has been
303 meta_session_dealloc(meta_session_t *session)
305 if ((session->find_objs_info).matched_objs) {
306 free((session->find_objs_info).matched_objs);
309 free((session->mech_support_info).supporting_slots);
312 * If there were active operations, cleanup the slot session so that
316 if (session->op1.type != 0)
317 meta_operation_cleanup(session, session->op1.type, FALSE);
320 (void) pthread_rwlock_destroy(&session->session_lock);
321 (void) pthread_mutex_destroy(&session->isClosingSession_lock);
322 (void) pthread_rwlock_destroy(&session->object_list_lock);
324 meta_session_delay_free(session);
328 * This function adds the to-be-freed meta session to a linked list.
331 * session (FIFO) in the list.
340 /* Add the newly deleted session at the end of the list */
352 * Free the first session in the list only if