Commit 3e3a5f70 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul Committed by Yoni Fogel

close[t:4756] Remove the pwrite_lock_init and destroy functions. Closes #4756.

git-svn-id: file:///svn/toku/tokudb@42143 c7de825b-a66e-492c-adef-691d508d4ae1
parent 6ed9c142
...@@ -83,18 +83,6 @@ toku_brt_serialize_destroy(void) { ...@@ -83,18 +83,6 @@ toku_brt_serialize_destroy(void) {
static toku_pthread_mutex_t pwrite_mutex = TOKU_PTHREAD_MUTEX_INITIALIZER; static toku_pthread_mutex_t pwrite_mutex = TOKU_PTHREAD_MUTEX_INITIALIZER;
static int pwrite_is_locked=0; static int pwrite_is_locked=0;
int
toku_pwrite_lock_init(void) {
int r = toku_pthread_mutex_init(&pwrite_mutex, NULL); resource_assert_zero(r);
return r;
}
int
toku_pwrite_lock_destroy(void) {
int r = toku_pthread_mutex_destroy(&pwrite_mutex); resource_assert_zero(r);
return r;
}
static inline void static inline void
lock_for_pwrite (void) { lock_for_pwrite (void) {
// Locks the pwrite_mutex. // Locks the pwrite_mutex.
......
...@@ -6489,22 +6489,6 @@ int toku_brt_truncate (BRT brt) { ...@@ -6489,22 +6489,6 @@ int toku_brt_truncate (BRT brt) {
return r; return r;
} }
static int
toku_brt_lock_init(void) {
int r = 0;
if (r==0)
r = toku_pwrite_lock_init();
return r;
}
static int
toku_brt_lock_destroy(void) {
int r = 0;
if (r==0)
r = toku_pwrite_lock_destroy();
return r;
}
int toku_brt_init(void (*ydb_lock_callback)(void), int toku_brt_init(void (*ydb_lock_callback)(void),
void (*ydb_unlock_callback)(void), void (*ydb_unlock_callback)(void),
void (*db_set_brt)(DB*,BRT)) { void (*db_set_brt)(DB*,BRT)) {
...@@ -6512,8 +6496,6 @@ int toku_brt_init(void (*ydb_lock_callback)(void), ...@@ -6512,8 +6496,6 @@ int toku_brt_init(void (*ydb_lock_callback)(void),
//Portability must be initialized first //Portability must be initialized first
if (r==0) if (r==0)
r = toku_portability_init(); r = toku_portability_init();
if (r==0)
r = toku_brt_lock_init();
if (r==0) if (r==0)
r = toku_checkpoint_init(ydb_lock_callback, ydb_unlock_callback); r = toku_checkpoint_init(ydb_lock_callback, ydb_unlock_callback);
if (r == 0) if (r == 0)
...@@ -6527,8 +6509,6 @@ int toku_brt_destroy(void) { ...@@ -6527,8 +6509,6 @@ int toku_brt_destroy(void) {
int r = 0; int r = 0;
if (r == 0) if (r == 0)
r = toku_brt_serialize_destroy(); r = toku_brt_serialize_destroy();
if (r==0)
r = toku_brt_lock_destroy();
if (r==0) if (r==0)
r = toku_checkpoint_destroy(); r = toku_checkpoint_destroy();
//Portability must be cleaned up last //Portability must be cleaned up last
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment