| 1 |
/**************************************************************************/ |
| 2 |
/* */ |
| 3 |
/* This file is part of Frama-C. */ |
| 4 |
/* */ |
| 5 |
/* Copyright (C) 2007-2022 */ |
| 6 |
/* CEA (Commissariat à l'énergie atomique et aux énergies */ |
| 7 |
/* alternatives) */ |
| 8 |
/* */ |
| 9 |
/* you can redistribute it and/or modify it under the terms of the GNU */ |
| 10 |
/* Lesser General Public License as published by the Free Software */ |
| 11 |
/* Foundation, version 2.1. */ |
| 12 |
/* */ |
| 13 |
/* It is distributed in the hope that it will be useful, */ |
| 14 |
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ |
| 15 |
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ |
| 16 |
/* GNU Lesser General Public License for more details. */ |
| 17 |
/* */ |
| 18 |
/* See the GNU Lesser General Public License version 2.1 */ |
| 19 |
/* for more details (enclosed in the file licenses/LGPLv2.1). */ |
| 20 |
/* */ |
| 21 |
/**************************************************************************/ |
| 22 |
|
| 23 |
#ifndef __FC_AIO |
| 24 |
#define __FC_AIO |
| 25 |
#include "features.h" |
| 26 |
__PUSH_FC_STDLIB |
| 27 |
#include "__fc_define_off_t.h" |
| 28 |
#include "__fc_define_size_t.h" |
| 29 |
#include "__fc_define_ssize_t.h" |
| 30 |
#include "__fc_define_timespec.h" |
| 31 |
#include "signal.h" |
| 32 |
|
| 33 |
__BEGIN_DECLS |
| 34 |
|
| 35 |
struct aiocb { |
| 36 |
int aio_fildes; |
| 37 |
off_t aio_offset; |
| 38 |
volatile void *aio_buf; |
| 39 |
size_t aio_nbytes; |
| 40 |
int aio_reqprio; |
| 41 |
struct sigevent aio_sigevent; |
| 42 |
int aio_lio_opcode; |
| 43 |
}; |
| 44 |
|
| 45 |
#define AIO_ALLDONE 2 |
| 46 |
#define AIO_CANCELED 0 |
| 47 |
#define AIO_NOTCANCELED 1 |
| 48 |
|
| 49 |
#define LIO_NOP 2 |
| 50 |
#define LIO_NOWAIT 1 |
| 51 |
|
| 52 |
#define LIO_READ 0 |
| 53 |
#define LIO_WAIT 0 |
| 54 |
#define LIO_WRITE 1 |
| 55 |
|
| 56 |
extern int aio_cancel(int fildes, struct aiocb *aiocbp); |
| 57 |
|
| 58 |
extern int aio_error(const struct aiocb *aiocbp); |
| 59 |
|
| 60 |
extern int aio_fsync(int op, struct aiocb *aiocbp); |
| 61 |
|
| 62 |
extern int aio_read(struct aiocb *aiocbp); |
| 63 |
|
| 64 |
extern ssize_t aio_return(struct aiocb *aiocbp); |
| 65 |
|
| 66 |
extern int aio_suspend(const struct aiocb *const list[], int nent, |
| 67 |
const struct timespec *timeout); |
| 68 |
|
| 69 |
extern int aio_write(struct aiocb *aiocbp); |
| 70 |
|
| 71 |
extern int lio_listio(int mode, struct aiocb *restrict const list[restrict], |
| 72 |
int nent, struct sigevent *restrict sig); |
| 73 |
|
| 74 |
__END_DECLS |
| 75 |
|
| 76 |
__POP_FC_STDLIB |
| 77 |
#endif |