[Senna-dev 1002] lock関係のAPIを外に出してほしい

Back to archive index

Kouhei Sutou kou****@cozmi*****
2008年 9月 9日 (火) 08:57:44 JST


須藤です。

sen_hashとsen_pat用のlockまわりのAPIを外に出してもらえると嬉しいです。

Index: lib/hash.h
===================================================================
--- lib/hash.h	(リビジョン 1096)
+++ lib/hash.h	(作業コピー)
@@ -129,6 +129,10 @@
 sen_id sen_hash_get(sen_ctx *ctx, sen_hash *hash, const void *key,
int key_size,
                     void **value, sen_table_search_flags *flags);

+sen_rc sen_hash_lock(sen_ctx *ctx, sen_hash *hash, int timeout);
+sen_rc sen_hash_unlock(sen_ctx *ctx, sen_hash *hash);
+sen_rc sen_hash_clear_lock(sen_ctx *ctx, sen_hash *hash);
+
 #define SEN_HASH_EACH(hash,id,key,key_size,value,block) do {              \
   sen_hash_cursor *_sc = sen_hash_cursor_open(ctx, hash, NULL, 0, NULL, 0, 0);\
   if (_sc) {\
Index: lib/pat.h
===================================================================
--- lib/pat.h	(リビジョン 1096)
+++ lib/pat.h	(作業コピー)
@@ -130,6 +130,10 @@
                    void **value, sen_table_search_flags *flags);
 sen_id sen_pat_curr_id(sen_ctx *ctx, sen_pat *pat);

+sen_rc sen_pat_lock(sen_ctx *ctx, sen_pat *pat, int timeout);
+sen_rc sen_pat_unlock(sen_ctx *ctx, sen_pat *pat);
+sen_rc sen_pat_clear_lock(sen_ctx *ctx, sen_pat *pat);
+
 /* private */
 const char *_sen_pat_key(sen_pat *pat, sen_id id, uint32_t *key_size);




Senna-dev メーリングリストの案内
Back to archive index