Commit d4f5d6de 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 6b4801ce
......@@ -83,18 +83,6 @@ toku_brt_serialize_destroy(void) {
static toku_pthread_mutex_t pwrite_mutex = TOKU_PTHREAD_MUTEX_INITIALIZER;
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
lock_for_pwrite (void) {
// Locks the pwrite_mutex.
......
......@@ -6489,22 +6489,6 @@ int toku_brt_truncate (BRT brt) {
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),
void (*ydb_unlock_callback)(void),
void (*db_set_brt)(DB*,BRT)) {
......@@ -6512,8 +6496,6 @@ int toku_brt_init(void (*ydb_lock_callback)(void),
//Portability must be initialized first
if (r==0)
r = toku_portability_init();
if (r==0)
r = toku_brt_lock_init();
if (r==0)
r = toku_checkpoint_init(ydb_lock_callback, ydb_unlock_callback);
if (r == 0)
......@@ -6527,8 +6509,6 @@ int toku_brt_destroy(void) {
int r = 0;
if (r == 0)
r = toku_brt_serialize_destroy();
if (r==0)
r = toku_brt_lock_destroy();
if (r==0)
r = toku_checkpoint_destroy();
//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