src/xcalls/x_pthread_create.c File Reference

x_pthread_create implementation. More...

#include <pthread.h>
#include <core/tx.h>
#include <core/config.h>
#include <core/txdesc.h>
#include <misc/debug.h>
#include <misc/errno.h>
#include <misc/malloc.h>
#include <xcalls/xcalls.h>

Go to the source code of this file.

Classes

struct  x_pthread_create_control_block_s

Typedefs

typedef x_pthread_create_control_block_s x_pthread_create_control_block_t

Functions

int XCALL_DEF() x_pthread_create (pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg, int *result)
 Creates a thread.


Detailed Description

x_pthread_create implementation.

Definition in file x_pthread_create.c.


Function Documentation

int XCALL_DEF() x_pthread_create ( pthread_t *  thread,
const pthread_attr_t *  attr,
void *(*)(void *)  start_routine,
void *  arg,
int *  result 
)

Creates a thread.

Execution : in-place creation of the thread but deferred execution of the start_routine

Asynchronous failures : commit, abort

Parameters:
[out] thread The new thread's identifier.
[in] attr Creation attributes.
[in] start_routine The routine that the new thread executes.
[in] arg Parameter passed to start_routine
[out] result Where to store any asynchronous failures.
Returns:
The new file descriptor on success, or -1 if a synchronous failure occurred (in which case, errno is set appropriately).

Definition at line 99 of file x_pthread_create.c.

References x_pthread_create_control_block_s::arg, MALLOC, x_pthread_create_control_block_s::start, x_pthread_create_control_block_s::start_lock, txc_tx_get_txd(), txc_tx_get_xactstate(), txc_tx_register_commit_action(), txc_tx_register_undo_action(), TXC_TX_REGULAR_COMMIT_ACTION_ORDER, and TXC_TX_REGULAR_UNDO_ACTION_ORDER.


Generated on Wed Dec 9 20:32:41 2009 for xCalls by  doxygen 1.4.7