PK11_GETTAB(slot)->C_CloseSession(rwsession); if (slot->session == CK_INVALID_SESSION) { PK11_GETTAB(slot)->C_OpenSession(slot->slotID,CKF_SERIAL_SESSION, slot,pk11_notify,&slot->session); } if (!slot->isThreadSafe) PK11_ExitSlotMonitor(slot);
PK11_RestoreROSession(PK11SlotInfo *slot,CK_SESSION_HANDLE rwsession){    if (slot->defRWSession) {	PK11_ExitSlotMonitor(slot);	return;    }    PK11_GETTAB(slot)->C_CloseSession(rwsession);    if (slot->session == CK_INVALID_SESSION) {    	 PK11_GETTAB(slot)->C_OpenSession(slot->slotID,CKF_SERIAL_SESSION,				  	 slot,pk11_notify,&slot->session);    }    if (!slot->isThreadSafe) PK11_ExitSlotMonitor(slot);}