SC_READ(2)
SCORE-D SYSTEM CALLS
SC_READ(2)
NAME
sc_read - read data from a SCore-D device

SYNOPSIS
#include <sc.h>

int sc_read(int scfd, char* buffer, scarg_t* length, scarg_t offset0, scarg_t offset1);

DESCRIPTION
The offset0 and offset1 parameters are given when accessing a device. The semantics of these parameters are defined by the opened device. The buffer variable points to a buffer in the user parallel process. In the sc_read() function, the value of the length variable becomes the length of the buffer actually read.

RETURN VALUES
sc_read() returns 0 on success or one of the following errors:

ERRORS
ENODEV
No such device
ENOSPACE
Cannot allocate device buffer for communication
EBUSY
Cannot open device
EIO
Cannot communicate with device process
EINTR
Job is restarted from a checkpoint during the systemcall

CREDIT
This document is a part of the SCore cluster system software developed at PC Cluster Consortium, Japan. Copyright (C) 2003 PC Cluster Consortium.