Files
photon/libc/sys/linux/__fio.h

34 lines
875 B
C
Raw Normal View History

2020-03-31 16:21:07 +01:00
#ifndef SYS_LINUX___FIO_H_
#define SYS_LINUX___FIO_H_
#define __FIO_BUFSZ 512
#if defined(__cplusplus)
extern "C" {
#endif
struct __io_file {
char buf[__FIO_BUFSZ];
unsigned int buf_idx;
unsigned int fd;
2020-04-01 12:04:25 +01:00
char err;
2020-03-31 16:21:07 +01:00
};
extern int __fileno(struct __io_file *f);
2020-08-24 10:20:43 +01:00
extern void __fio_init();
extern unsigned int __fio_read(struct __io_file *f, char *buf, unsigned int sz);
2020-04-01 11:58:54 +01:00
extern unsigned int __fio_write(struct __io_file *f, const char *buf, unsigned int sz);
extern unsigned int __fio_flush(struct __io_file *f);
2020-04-01 12:04:25 +01:00
extern int __fio_error(struct __io_file *f);
2020-08-24 10:20:43 +01:00
extern int __fio_ungetc(struct __io_file *f, char c);
extern int __fio_fopen(const char *path, const char *mode, struct __io_file *out);
extern int __fio_fclose(struct __io_file *in);
extern int __fio_fdopen(int fd, const char *mode, struct __io_file *out);
2020-03-31 16:21:07 +01:00
#if defined(__cplusplus)
}
#endif
#endif