src/xcalls/x_write_pipe.c File Reference

x_write_pipe implementation. More...

#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <misc/debug.h>
#include <core/tx.h>
#include <core/config.h>
#include <core/koa.h>
#include <core/buffer.h>
#include <core/txdesc.h>
#include <core/stats.h>
#include <libc/syscalls.h>
#include <xcalls/xcalls.h>

Go to the source code of this file.

Classes

struct  x_write_commit_args_s

Typedefs

typedef x_write_commit_args_s x_write_commit_args_t

Functions

ssize_t XCALL_DEF() x_write_pipe (int fd, const void *buf, size_t nbyte, int *result)
 Writes to a pipe.


Detailed Description

x_write_pipe implementation.

Definition in file x_write_pipe.c.


Function Documentation

ssize_t XCALL_DEF() x_write_pipe ( int  fd,
const void *  buf,
size_t  nbyte,
int *  result 
)

Writes to a pipe.

Execution : deferred

Asynchronous failures : commit

Parameters:
[in] fd The file descriptor of the pipe's write end.
[in] buf The buffer that has the data to write.
[in] nbyte The number of bytes to write.
[out] result Where to store any asynchronous failures.
Returns:
The number of written bytes on success, or -1 if a synchronous failure occurred (in which case, errno is set appropriately).

Definition at line 65 of file x_write_pipe.c.

References x_write_commit_args_s::buf, x_write_commit_args_s::fd, x_write_commit_args_s::nbyte, txc_buffer_linear_free(), txc_buffer_linear_malloc(), txc_g_koamgr, TXC_INTERNALERROR, txc_koa_get_sentinel(), txc_koa_lock_fd(), txc_koa_lookup_fd2koa(), txc_koa_unlock_fd(), TXC_R_BUSYSENTINEL, TXC_R_FAILURE, TXC_SENTINEL_ACQUIREONRETRY, txc_sentinel_tryacquire(), txc_stats_txstat_increment, txc_tx_abort_transaction(), txc_tx_get_txd(), txc_tx_get_xactstate(), txc_tx_register_commit_action(), TXC_TX_REGULAR_COMMIT_ACTION_ORDER, and x_write_pipe().


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