branch, ticket-227, updated. f345b919dfa942c0c65dd78833431d7e4f52e050
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "". The branch, ticket-227 has been updated via f345b919dfa942c0c65dd78833431d7e4f52e050 (commit) via b6db762bccd8ec11b64fb9f990ef85c9e0d8d280 (commit) via a161cdaaf59cb93639397e412a47c59b6f3b45dd (commit) from 5cb630979958f7597c5a519092b304807a3aa6d7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f345b919dfa942c0c65dd78833431d7e4f52e050 Author: Phil Carns <[email protected]> Date: Fri Dec 14 15:56:15 2012 -0500 fix function prototypes in bdb-resource.c commit b6db762bccd8ec11b64fb9f990ef85c9e0d8d280 Author: Phil Carns <[email protected]> Date: Fri Dec 14 15:52:26 2012 -0500 fix bdb_init locking commit a161cdaaf59cb93639397e412a47c59b6f3b45dd Author: Phil Carns <[email protected]> Date: Fri Dec 14 15:50:35 2012 -0500 full remove init registration from bdb resource ----------------------------------------------------------------------- Summary of changes: code/src/common/resources/bdb/bdb-resource.c | 31 ++++++++++++------------- 1 files changed, 15 insertions(+), 16 deletions(-) Diff of changes: diff --git a/code/src/common/resources/bdb/bdb-resource.c b/code/src/common/resources/bdb/bdb-resource.c index aafa62b..539179d 100644 --- a/code/src/common/resources/bdb/bdb-resource.c +++ b/code/src/common/resources/bdb/bdb-resource.c @@ -161,7 +161,6 @@ static int cursor_work_fn(struct ae_op* op); static int txn_checkpoint_work_fn(struct ae_op* op); static int log_flush_work_fn(struct ae_op* op); static triton_ret_t progress_mode_updater(const char *key, const char *value); -__attribute__((constructor)) void triton_bdb_init_register(void); static triton_ret_t start_detached_thread(pthread_t* tid, void *(*start_routine)(void*), void * arg); static int txn_compare(const void *key, struct triton_hash_link *hash_link); @@ -360,7 +359,7 @@ static triton_ret_t bdb_launch_op( return(TRITON_SUCCESS); } -static triton_ret_t bdb_poll(ae_context_t context) +static int bdb_poll(ae_context_t context, void* user_data) { struct ae_op *a_op; struct bdb_op *b_op; @@ -373,7 +372,7 @@ static triton_ret_t bdb_poll(ae_context_t context) { triton_mutex_unlock(&bdb_mutex); /* nothing to work on */ - return(TRITON_SUCCESS); + return(AE_SUCCESS); } triton_mutex_unlock(&bdb_mutex); @@ -396,15 +395,19 @@ static triton_ret_t bdb_poll(ae_context_t context) ae_resource_request_poll(a_op->ctx, triton_bdb_resource_id); } - return TRITON_SUCCESS; + return AE_SUCCESS; } -static triton_ret_t bdb_cancel(ae_context_t triton_ctx, ae_op_id_t op_id) +static int bdb_cancel(ae_context_t triton_ctx, ae_op_id_t op_id) { /* TODO: maybe come back and at least figure out if the operation is on * the queue? If so we can cancel it, otherwise we do nothing. */ - return TRITON_SUCCESS; + + /* TODO: this code needs to be fixed! Return code should depend on + * result of cancel???? + */ + return AE_SUCCESS; } struct ae_resource triton_bdb_resource = @@ -432,6 +435,7 @@ triton_ret_t bdb_init(void) "Output debugging information for the Berkeley DB resources"); if(ret != TRITON_SUCCESS) { + triton_mutex_unlock (&bdb_ref_mutex); return(ret); } @@ -440,6 +444,7 @@ triton_ret_t bdb_init(void) "Progress mode for BDB transactions (THREAD_PER_OP or THREAD_PER_TXN"); if(ret != TRITON_SUCCESS && ret != TRITON_ERR_EXIST) { + triton_mutex_unlock (&bdb_ref_mutex); return(ret); } @@ -448,6 +453,7 @@ triton_ret_t bdb_init(void) "Progress mode for flushing BDB data (IN_PLACE, POLL, THREAD_PER_OP, or ONE_THREAD"); if(ret != TRITON_SUCCESS && ret != TRITON_ERR_EXIST) { + triton_mutex_unlock (&bdb_ref_mutex); return(ret); } @@ -458,18 +464,21 @@ triton_ret_t bdb_init(void) &bdb_opcache); if(ret != TRITON_SUCCESS) { + triton_mutex_unlock (&bdb_ref_mutex); return(ret); } txn_thread_table = triton_hash_init(txn_compare, triton_hash_ptr_hash, 200); if(!txn_thread_table) { + triton_mutex_unlock (&bdb_ref_mutex); return(TRITON_ERR_NOMEM); } ae_ret = ae_resource_register(&triton_bdb_resource, &triton_bdb_resource_id); if(ret != AE_SUCCESS) { + triton_mutex_unlock (&bdb_ref_mutex); ae_opcache_destroy(bdb_opcache); return(TRITON_ERR_UNKNOWN); } @@ -493,25 +502,15 @@ void bdb_finalize(void) triton_debug(bdb_r_mask, "bdb deadlock_counter: %lu\n", deadlock_counter); - /* @TODO: Need to call finalize function for dependencies*/ } - triton_mutex_unlock (&bdb_ref_mutex); return; } -/* -__attribute__((constructor)) void triton_bdb_init_register(void) -{ - triton_init_register("triton.tosd.bdb", bdb_init, bdb_finalize, NULL, - "triton.debug", "aesop.control", "triton.zeroconf"); -} -*/ - ae_define_post(triton_ret_t, bdb_txn_begin, DB_ENV *env, DB_TXN *parent, hooks/post-receive --
participants (1)
-
noreply@mcs.anl.gov