summaryrefslogtreecommitdiff
path: root/accel-pppd/triton/mempool.h
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2014-09-20 12:18:49 +0400
committerDmitry Kozlov <xeb@mail.ru>2014-09-20 12:18:49 +0400
commit62e89248160d3592c2d754fcaa15e37586a5b091 (patch)
treea6513cfd1e8ef6c6079ea2436e8573b122cc1ec6 /accel-pppd/triton/mempool.h
parent0a58c20b44136c1fba996becea18696b3f67a1f9 (diff)
downloadaccel-ppp-62e89248160d3592c2d754fcaa15e37586a5b091.tar.gz
accel-ppp-62e89248160d3592c2d754fcaa15e37586a5b091.zip
rewrite of authentication/accounting procedures
This patch gets rid of synchronuos style of authentication/accounting. Synchronous style of authentication/accounting produced sleeping threads which becomes a problem when lots of sessions started/stopped and all they want authorization/accounting.
Diffstat (limited to 'accel-pppd/triton/mempool.h')
-rw-r--r--accel-pppd/triton/mempool.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/accel-pppd/triton/mempool.h b/accel-pppd/triton/mempool.h
index bdb3e71..53eebfb 100644
--- a/accel-pppd/triton/mempool.h
+++ b/accel-pppd/triton/mempool.h
@@ -12,14 +12,15 @@ struct mempool_stat_t
typedef void * mempool_t;
mempool_t *mempool_create(int size);
mempool_t *mempool_create2(int size);
-void mempool_free(void*);
struct mempool_stat_t mempool_get_stat(void);
#ifdef MEMDEBUG
-void *mempool_alloc_md(mempool_t*, const char *fname, int line);
-#define mempool_alloc(pool) mempool_alloc_md(pool, __FILE__, __LINE__)
+void *md_mempool_alloc(mempool_t*, const char *fname, int line);
+#define mempool_alloc(pool) md_mempool_alloc(pool, __FILE__, __LINE__)
+#define mempool_free(ptr) md_free(ptr, __FILE__, __LINE__)
#else
void *mempool_alloc(mempool_t*);
+void mempool_free(void*);
#endif
#endif