[Groonga-commit] groonga/groonga at 9b75041 [master] io: remove grn_expire because it is not used

Back to archive index

Susumu Yata null+****@clear*****
Wed Mar 30 16:28:06 JST 2016


Susumu Yata	2016-03-30 16:28:06 +0900 (Wed, 30 Mar 2016)

  New Revision: 9b75041994d1e9db7d9dd02577f1600fea01531d
  https://github.com/groonga/groonga/commit/9b75041994d1e9db7d9dd02577f1600fea01531d

  Message:
    io: remove grn_expire because it is not used
    
    GitHub: #507

  Modified files:
    lib/grn_io.h
    lib/io.c

  Modified: lib/grn_io.h (+0 -1)
===================================================================
--- lib/grn_io.h    2016-03-30 15:57:09 +0900 (ed162ce)
+++ lib/grn_io.h    2016-03-30 16:28:06 +0900 (a8fb1af)
@@ -354,7 +354,6 @@ uint32_t grn_io_get_type(grn_io *io);
 void grn_io_init_from_env(void);
 
 uint32_t grn_io_expire(grn_ctx *ctx, grn_io *io, int count_thresh, uint32_t limit);
-uint32_t grn_expire(grn_ctx *ctx, int count_thresh, uint32_t limit);
 
 grn_rc grn_io_flush(grn_ctx *ctx, grn_io *io);
 

  Modified: lib/io.c (+0 -36)
===================================================================
--- lib/io.c    2016-03-30 15:57:09 +0900 (f14b5fd)
+++ lib/io.c    2016-03-30 16:28:06 +0900 (1f4af75)
@@ -1299,42 +1299,6 @@ grn_io_expire(grn_ctx *ctx, grn_io *io, int count_thresh, uint32_t limit)
   return n;
 }
 
-static uint32_t
-grn_expire_(grn_ctx *ctx, int count_thresh, uint32_t limit)
-{
-  uint32_t n = 0;
-  grn_io *io;
-  GRN_HASH_EACH(ctx, grn_gctx.impl->ios, id, NULL, NULL, (void **)&io, {
-    grn_plugin_close(ctx, id);
-    n += grn_io_expire(ctx, io, count_thresh, limit);
-    if (n >= limit) { break; }
-  });
-  return n;
-}
-
-uint32_t
-grn_expire(grn_ctx *ctx, int count_thresh, uint32_t limit)
-{
-  grn_ctx *c;
-  uint32_t n = 0;
-  CRITICAL_SECTION_ENTER(grn_glock);
-  if (grn_gtick) {
-    for (c = grn_gctx.next;; c = ctx->next) {
-      if (c == &grn_gctx) {
-        CRITICAL_SECTION_LEAVE(grn_glock);
-        n = grn_expire_(ctx, count_thresh, limit);
-        CRITICAL_SECTION_ENTER(grn_glock);
-        break;
-      }
-      if ((c->seqno & 1) && (c->seqno == c->seqno2)) { break; }
-    }
-  }
-  grn_gtick++;
-  for (c = grn_gctx.next; c != &grn_gctx; c = ctx->next) { c->seqno2 = c->seqno; }
-  CRITICAL_SECTION_LEAVE(grn_glock);
-  return n;
-}
-
 void *
 grn_io_anon_map(grn_ctx *ctx, grn_io_mapinfo *mi, size_t length)
 {
-------------- next part --------------
HTML����������������������������...
Download 



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