summaryrefslogtreecommitdiffstats
path: root/src/statfile.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-01-27 19:15:51 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-01-27 19:15:51 +0300
commita450d0faa8851a7df8dbb52788f99fe216f57c3d (patch)
treeed2f45a6fd083e7e3b833bbdd576874d122c5f69 /src/statfile.h
parentec5b7a84cfd158b8b6b5714b47c48028a9c29a6a (diff)
downloadrspamd-a450d0faa8851a7df8dbb52788f99fe216f57c3d.tar.gz
rspamd-a450d0faa8851a7df8dbb52788f99fe216f57c3d.zip
* Add new hash for storing hash data in shared memory
* Add rwlocks implementation (primitive) in memory pool library
Diffstat (limited to 'src/statfile.h')
-rw-r--r--src/statfile.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/statfile.h b/src/statfile.h
index ea0dc9965..eac83ca01 100644
--- a/src/statfile.h
+++ b/src/statfile.h
@@ -13,6 +13,7 @@
#include <stdint.h>
#endif
#include "mem_pool.h"
+#include "hash.h"
#define CHAIN_LENGTH 128
@@ -48,7 +49,7 @@ typedef struct stat_file_s {
} stat_file_t;
typedef struct statfile_pool_s {
- GHashTable *files;
+ rspamd_hash_t *files;
int opened;
size_t max;
size_t occupied;
@@ -58,7 +59,7 @@ typedef struct statfile_pool_s {
statfile_pool_t* statfile_pool_new (size_t max_size);
int statfile_pool_open (statfile_pool_t *pool, char *filename);
int statfile_pool_create (statfile_pool_t *pool, char *filename, size_t len);
-int statfile_pool_close (statfile_pool_t *pool, char *filename);
+int statfile_pool_close (statfile_pool_t *pool, char *filename, gboolean remove_hash);
void statfile_pool_delete (statfile_pool_t *pool);
void statfile_pool_lock_file (statfile_pool_t *pool, char *filename);
void statfile_pool_unlock_file (statfile_pool_t *pool, char *filename);