From 1a7a9bdc976e4496d739bc57053e613f993bd85b Mon Sep 17 00:00:00 2001 From: wangzhengquan <wangzhengquan85@126.com> Date: 星期四, 16 七月 2020 10:03:11 +0800 Subject: [PATCH] update --- queue/hashtable.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/queue/hashtable.c b/queue/hashtable.c index 629d2af..43c59ce 100755 --- a/queue/hashtable.c +++ b/queue/hashtable.c @@ -15,8 +15,6 @@ TAILQ_ENTRY(tailq_entry_t) joint; } tailq_entry_t; -static int hashtable_mutex; - #define START_KEY 1000 typedef TAILQ_HEAD(tailq_header_t, tailq_entry_t) tailq_header_t; @@ -56,7 +54,7 @@ } -void* _hashtable_put(hashtable_t *hashtable, int key, void *value) +void * _hashtable_put(hashtable_t *hashtable, int key, void *value) { size_t code = hashcode(key); void *oldvalue; @@ -209,7 +207,7 @@ return res; } -void* hashtable_put(hashtable_t *hashtable, int key, void *value) { +void hashtable_put(hashtable_t *hashtable, int key, void *value) { SemUtil::dec(hashtable->mutex); while (hashtable->readcnt > 0) { @@ -262,4 +260,4 @@ } } return keyset; -} \ No newline at end of file +} -- Gitblit v1.8.0