Exemple #1
0
void *aborttx(void *arg)
{
  struct param *node = (struct param*)arg;// get tid and count  
  start_operation(node->tid, node->count);
  zgt_p(0);  //locking the transaction manager
  do_commit_abort(node->tid,TR_ABORT);
  zgt_v(0);  // releasing the transaction manager
  finish_operation(node->tid);
  pthread_exit(NULL);			// thread exit
}
Exemple #2
0
void *committx(void *arg)
{
 //remove the locks before committing
  struct param *node = (struct param*)arg;// get tid and count
  start_operation(node->tid, node->count);
  zgt_tx *txptr=get_tx(node->tid);
  zgt_p(0); // locking the transaction manager
  txptr->status=TR_END;
  do_commit_abort(node->tid,TR_END);
  zgt_v(0);  // releasing the transaction manager
  finish_operation(node->tid);
  pthread_exit(NULL);			// thread exit
}
Exemple #3
0
static void
do_abort(PGconn *conn, txn_info *txn)
{
	do_commit_abort(conn, txn, false);
}