From 4588024d5afb75aa6d912c0475759360762257a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Sat, 7 May 2022 23:13:19 +0800 Subject: [PATCH] add more logs --- dict.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dict.h b/dict.h index 69b0064..5d9f58d 100644 --- a/dict.h +++ b/dict.h @@ -100,6 +100,7 @@ static inline FILE* open_ex_dict() { if(!dict_fp) dict_fp = fopen(dict_filepath, "rb+"); else rewind(dict_fp); if(dict_fp) is_ex_dict_open = 1; + puts("Open ex dict"); return dict_fp; } @@ -114,6 +115,7 @@ static inline FILE* open_shared_dict(uint32_t index, int requirelock) { } if(!dict_thread_fp[index]) dict_thread_fp[index] = fopen(dict_filepath, "rb"); else rewind(dict_thread_fp[index]); + puts("Open shared dict"); return dict_thread_fp[index]; } @@ -126,6 +128,7 @@ static inline int require_shared_lock(uint32_t index) { perror("Open dict: Readlock busy"); return 1; } + puts("Shared lock required"); return 0; }