src/xcalls/x_read_pipe.c File Reference

x_read_pipe implementation. More...

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

Go to the source code of this file.

Classes

struct  x_read_pipe_commit_undo_args_s

Typedefs

typedef x_read_pipe_commit_undo_args_s x_read_pipe_commit_undo_args_t

Functions

ssize_t XCALL_DEF() x_read_pipe (int fd, void *buf, size_t nbyte, int *result)
 Reads from a pipe.


Detailed Description

x_read_pipe implementation.

Definition in file x_read_pipe.c.


Function Documentation

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

Reads from a pipe.

The xCall buffers any read data so that in case of transaction abort read data are not consumed but stay present for the next pipe read.

Execution : in-place

Asynchronous failures : commit, abort

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

Definition at line 257 of file x_read_pipe.c.

References TXC_INTERNALERROR, txc_tx_get_txd(), and txc_tx_get_xactstate().


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