2013-11-27 16:28:31 +01:00
|
|
|
/*
|
2013-11-03 14:32:25 +01:00
|
|
|
* Copyright (C) 2013 INRIA.
|
|
|
|
*
|
2014-08-23 15:43:13 +02:00
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
|
|
* directory for more details.
|
2013-11-03 14:32:25 +01:00
|
|
|
*/
|
|
|
|
|
2013-11-27 16:28:31 +01:00
|
|
|
/**
|
2013-11-28 13:25:33 +01:00
|
|
|
* @ingroup sys_posix
|
2013-11-03 14:32:25 +01:00
|
|
|
* @{
|
2013-11-28 13:25:33 +01:00
|
|
|
* @file posix_io.h
|
|
|
|
* @brief POSIX-like IO
|
2013-11-03 14:32:25 +01:00
|
|
|
*
|
2013-11-28 13:25:33 +01:00
|
|
|
* @author Kaspar Schleiser <kaspar@schleiser.de>
|
|
|
|
* @author Stephan Zeisberg <zeisberg@mi.fu-berlin.de>
|
|
|
|
* @author Oliver Hahm <oleg@hobbykeller.org>
|
|
|
|
* @author Martin Lenders <mlenders@inf.fu-berlin.de>
|
2013-11-03 14:32:25 +01:00
|
|
|
*/
|
2010-09-24 16:28:34 +02:00
|
|
|
#ifndef __READ_H
|
2013-06-22 05:11:53 +02:00
|
|
|
#define __READ_H
|
2010-09-24 16:28:34 +02:00
|
|
|
|
2014-07-06 22:57:56 +02:00
|
|
|
#include "kernel_types.h"
|
|
|
|
|
2010-09-24 16:28:34 +02:00
|
|
|
#define OPEN 0
|
|
|
|
#define CLOSE 1
|
|
|
|
#define READ 2
|
|
|
|
#define WRITE 3
|
|
|
|
|
2011-03-08 11:43:21 +01:00
|
|
|
struct posix_iop_t {
|
2010-09-24 16:28:34 +02:00
|
|
|
int nbytes;
|
|
|
|
char *buffer;
|
|
|
|
};
|
|
|
|
|
2014-08-11 13:10:12 +02:00
|
|
|
int posix_open(int pid, int flags);
|
|
|
|
int posix_close(int pid);
|
|
|
|
int posix_read(int pid, char *buffer, int bufsize);
|
|
|
|
int posix_write(int pid, char *buffer, int bufsize);
|
2013-11-28 13:25:33 +01:00
|
|
|
|
|
|
|
/** @} */
|
2010-09-24 16:28:34 +02:00
|
|
|
#endif /* __READ_H */
|