1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys/include/posix_io.h
Oleg Hahm 983d056c75 core: harmonizes the data type for the process ID
Instead of using differing integer types use kernel_pid_t for process
identifier. This type is introduced in a new header file to avoid
circular dependencies.
2014-08-01 12:02:54 +02:00

42 lines
952 B
C

/*
* Copyright (C) 2013 INRIA.
*
* This file is subject to the terms and conditions of the GNU Lesser General
* Public License. See the file LICENSE in the top level directory for more
* details.
*/
/**
* @ingroup sys_posix
* @{
* @file posix_io.h
* @brief POSIX-like IO
*
* @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>
*/
#ifndef __READ_H
#define __READ_H
#include "kernel_types.h"
#define OPEN 0
#define CLOSE 1
#define READ 2
#define WRITE 3
struct posix_iop_t {
int nbytes;
char *buffer;
};
int posix_open(kernel_pid_t pid, int flags);
int posix_close(kernel_pid_t pid);
int posix_read(kernel_pid_t pid, char *buffer, int bufsize);
int posix_write(kernel_pid_t pid, char *buffer, int bufsize);
/** @} */
#endif /* __READ_H */