summaryrefslogtreecommitdiff
path: root/include/lf.h
diff options
context:
space:
mode:
authorunknown <serg@janus.mylan>2006-08-17 15:20:58 +0200
committerunknown <serg@janus.mylan>2006-08-17 15:20:58 +0200
commit74d050d000ff9db79e36931988386fe7988f8dd2 (patch)
treec1314972c00652cda1f4feaca6bee4aeaf330fb7 /include/lf.h
parentd1a8a2c7345847fc750c2d36908913dedb052c9c (diff)
downloadmariadb-git-74d050d000ff9db79e36931988386fe7988f8dd2.tar.gz
maria transaction manager with unit tests
include/lf.h: few lf API changes mysys/lf_alloc-pin.c: few lf API changes mysys/lf_dynarray.c: few lf API changes mysys/lf_hash.c: few lf API changes storage/maria/Makefile.am: transaction manager unittest/Makefile.am: maria transaction manager unittest/mysys/my_atomic-t.c: ensure that values are positive storage/maria/trxman.h: New BitKeeper file ``storage/maria/trxman.h'' unittest/maria/Makefile.am: New BitKeeper file ``unittest/maria/Makefile.am'' unittest/maria/trxman-t.c: New BitKeeper file ``unittest/maria/trxman-t.c'' storage/maria/trxman.c: comment clarified
Diffstat (limited to 'include/lf.h')
-rw-r--r--include/lf.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/lf.h b/include/lf.h
index 299b4e07aa5..6a5047f6052 100644
--- a/include/lf.h
+++ b/include/lf.h
@@ -66,7 +66,7 @@ typedef struct {
typedef int (*lf_dynarray_func)(void *, void *);
void lf_dynarray_init(LF_DYNARRAY *array, uint element_size);
-void lf_dynarray_end(LF_DYNARRAY *array);
+void lf_dynarray_destroy(LF_DYNARRAY *array);
nolock_wrap(lf_dynarray_nr, int,
(LF_DYNARRAY *array, void *el),
@@ -139,15 +139,15 @@ typedef struct {
#define _lf_unpin(PINS, PIN) _lf_pin(PINS, PIN, NULL)
#define lf_pin(PINS, PIN, ADDR) \
do { \
- lf_lock_pins(PINS); \
+ lf_lock_by_pins(PINS); \
_lf_pin(PINS, PIN, ADDR); \
- lf_unlock_pins(PINS); \
+ lf_unlock_by_pins(PINS); \
} while (0)
#define lf_unpin(PINS, PIN) lf_pin(PINS, PIN, NULL)
void lf_pinbox_init(LF_PINBOX *pinbox, lf_pinbox_free_func *free_func,
void * free_func_arg);
-void lf_pinbox_end(LF_PINBOX *pinbox);
+void lf_pinbox_destroy(LF_PINBOX *pinbox);
lock_wrap(lf_pinbox_get_pins, LF_PINS *,
(LF_PINBOX *pinbox),
@@ -180,7 +180,7 @@ typedef struct st_lf_allocator {
} LF_ALLOCATOR;
void lf_alloc_init(LF_ALLOCATOR *allocator, uint size);
-void lf_alloc_end(LF_ALLOCATOR *allocator);
+void lf_alloc_destroy(LF_ALLOCATOR *allocator);
uint lf_alloc_in_pool(LF_ALLOCATOR *allocator);
#define _lf_alloc_free(PINS, PTR) _lf_pinbox_free((PINS), (PTR))
#define lf_alloc_free(PINS, PTR) lf_pinbox_free((PINS), (PTR))
@@ -216,10 +216,10 @@ typedef struct {
void lf_hash_init(LF_HASH *hash, uint element_size, uint flags,
uint key_offset, uint key_length, hash_get_key get_key,
CHARSET_INFO *charset);
-void lf_hash_end(LF_HASH *hash);
+void lf_hash_destroy(LF_HASH *hash);
int lf_hash_insert(LF_HASH *hash, LF_PINS *pins, const void *data);
-int lf_hash_search(LF_HASH *hash, LF_PINS *pins, const uchar *key, uint keylen);
-int lf_hash_delete(LF_HASH *hash, LF_PINS *pins, const uchar *key, uint keylen);
+void *lf_hash_search(LF_HASH *hash, LF_PINS *pins, const void *key, uint keylen);
+int lf_hash_delete(LF_HASH *hash, LF_PINS *pins, const void *key, uint keylen);
#define _lf_hash_get_pins(HASH) _lf_alloc_get_pins(&(HASH)->alloc)
#define lf_hash_get_pins(HASH) lf_alloc_get_pins(&(HASH)->alloc)
#define _lf_hash_put_pins(PINS) _lf_pinbox_put_pins(PINS)