提交 26c2f313 编写于 作者: D dapan1121

feature/qnode

上级 c524647b
...@@ -213,6 +213,8 @@ typedef struct SCtgAction { ...@@ -213,6 +213,8 @@ typedef struct SCtgAction {
#define TD_RWLATCH_WRITE_FLAG_COPY 0x40000000 #define TD_RWLATCH_WRITE_FLAG_COPY 0x40000000
#define CTG_IS_LOCKED(_lock) atomic_load_32((_lock))
#define CTG_LOCK(type, _lock) do { \ #define CTG_LOCK(type, _lock) do { \
if (CTG_READ == (type)) { \ if (CTG_READ == (type)) { \
assert(atomic_load_32((_lock)) >= 0); \ assert(atomic_load_32((_lock)) >= 0); \
......
...@@ -2431,6 +2431,10 @@ void catalogDestroy(void) { ...@@ -2431,6 +2431,10 @@ void catalogDestroy(void) {
tsem_post(&gCtgMgmt.sem); tsem_post(&gCtgMgmt.sem);
while (CTG_IS_LOCKED(&gCtgMgmt.lock)) {
usleep(1);
}
CTG_LOCK(CTG_WRITE, &gCtgMgmt.lock); CTG_LOCK(CTG_WRITE, &gCtgMgmt.lock);
SCatalog *pCtg = NULL; SCatalog *pCtg = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册