[Groonga-commit] groonga/groonga at 6d1805d [master] groonga: use the global grn_ctx in set_thread_limit

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Sep 25 17:31:50 JST 2015


Kouhei Sutou	2015-09-25 17:31:50 +0900 (Fri, 25 Sep 2015)

  New Revision: 6d1805d55cf6681991046d811b322af1474fb18f
  https://github.com/groonga/groonga/commit/6d1805d55cf6681991046d811b322af1474fb18f

  Message:
    groonga: use the global grn_ctx in set_thread_limit

  Modified files:
    src/groonga.c

  Modified: src/groonga.c (+2 -2)
===================================================================
--- src/groonga.c    2015-09-25 17:26:37 +0900 (d089d7f)
+++ src/groonga.c    2015-09-25 17:31:50 +0900 (0e06f0b)
@@ -491,14 +491,14 @@ groonga_set_thread_limit(uint32_t new_limit, void *data)
   uint32_t i;
   uint32_t current_nfthreads;
 
-  MUTEX_LOCK_ENSURE(NULL, q_mutex);
+  MUTEX_LOCK_ENSURE(&grn_gctx, q_mutex);
   current_nfthreads = nfthreads;
   max_nfthreads = new_limit;
   MUTEX_UNLOCK(q_mutex);
 
   if (current_nfthreads > new_limit) {
     for (i = 0; i < current_nfthreads; i++) {
-      MUTEX_LOCK_ENSURE(NULL, q_mutex);
+      MUTEX_LOCK_ENSURE(&grn_gctx, q_mutex);
       COND_SIGNAL(q_cond);
       MUTEX_UNLOCK(q_mutex);
     }
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index