Seq Manager
GTM_InitSeqManager初始化序列管理器
void GTM_InitSeqManager(void) {
int ii;
for (ii = 0; ii < SEQ_HASH_TABLE_SIZE; ii++){
GTMSequences[ii].shb_list = gtm_NIL;
GTM_RWLockInit(>MSequences[ii].shb_lock);
}
}
static GTM_SeqInfo *seq_find_seqinfo(GTM_SequenceKey seqkey)通過鍵查找GTM_SeqInfo值
static int seq_release_seqinfo(GTM_SeqInfo *seqinfo)擷取seqinfo->gs_lock鎖,将引用計數seqinfo->gs_ref_count減少,如果seqinfo->gs_state為SEQ_STATE_DELETED且引用計數為零的情況,需要使用seq_remove_seqinfo從序列管理器GTMSequences删除該GTM_SeqInfo,釋放seqinfo->gs_lock鎖。