#include <pthread.h>
#include <core/tx.h>
#include <core/config.h>
#include <core/txdesc.h>
#include <misc/debug.h>
#include <misc/errno.h>
#include <xcalls/xcalls.h>
Go to the source code of this file.
Classes | |
struct | x_undo_args_s |
Typedefs | |
typedef x_undo_args_s | x_undo_args_t |
Functions | |
int XCALL_DEF() | x_pthread_mutex_lock (pthread_mutex_t *mutex, int *result) |
Locks a mutex. |
Definition in file x_pthread_mutex_lock.c.
int XCALL_DEF() x_pthread_mutex_lock | ( | pthread_mutex_t * | mutex, | |
int * | result | |||
) |
Locks a mutex.
It safely locks a mutex by releasing the lock if the transaction aborts.
Execution : in-place
Asynchronous failures : abort
[in] | mutex | The mutex to lock. |
[out] | result | Where to store any asynchronous failures. |
Definition at line 52 of file x_pthread_mutex_lock.c.
References x_undo_args_s::mutex, txc_buffer_linear_malloc(), TXC_INTERNALERROR, txc_tx_abort_transaction(), txc_tx_get_txd(), txc_tx_get_xactstate(), txc_tx_register_undo_action(), and TXC_TX_REGULAR_UNDO_ACTION_ORDER.