Removed unsupported cruft from uio.h (uiomove()).

Made header C++ safe.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8780 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-09-01 16:26:15 +00:00
parent 53d77642d6
commit cc90b1798a
1 changed files with 12 additions and 21 deletions

View File

@ -1,39 +1,30 @@
/* uio.h */
#ifndef _SYS_UIO_H #ifndef _SYS_UIO_H
#define _SYS_UIO_H #define _SYS_UIO_H
/*
** Distributed under the terms of the Haiku License.
*/
#include <sys/types.h> #include <sys/types.h>
typedef struct iovec { typedef struct iovec {
void *iov_base; void *iov_base;
size_t iov_len; size_t iov_len;
} iovec; } iovec;
enum uio_rw { UIO_READ, UIO_WRITE }; #ifdef __cplusplus
extern "C" {
/* Segment flag values. */ #endif
enum uio_seg {
UIO_USERSPACE, /* from user data space */
UIO_SYSSPACE /* from system space */
};
struct uio {
struct iovec *uio_iov; /* pointer to array of iovecs */
int uio_iovcnt; /* number of iovecs in array */
off_t uio_offset; /* offset into file this uio corresponds to */
size_t uio_resid; /* residual i/o count */
enum uio_seg uio_segflg; /* see above */
enum uio_rw uio_rw; /* see above */
// struct proc *uio_procp; /* process if UIO_USERSPACE */
};
int uiomove(char *cp, int n, struct uio *uio);
ssize_t readv(int fd, const struct iovec *vector, size_t count); ssize_t readv(int fd, const struct iovec *vector, size_t count);
ssize_t readv_pos(int fd, off_t pos, const struct iovec *vec, size_t count); ssize_t readv_pos(int fd, off_t pos, const struct iovec *vec, size_t count);
ssize_t writev(int fd, const struct iovec *vector, size_t count); ssize_t writev(int fd, const struct iovec *vector, size_t count);
ssize_t writev_pos(int fd, off_t pos, const struct iovec *vec, size_t count); ssize_t writev_pos(int fd, off_t pos, const struct iovec *vec, size_t count);
#ifdef __cplusplus
}
#endif
#endif /* _SYS_UIO_H */ #endif /* _SYS_UIO_H */