linux下异步IO的简单例子
时间:2010-11-29 来源:shenhailuanma
aio.h中的struct aiocb
|
struct aiocb |
siginfo.h中的struct sigevent和union sigval
|
typedef struct sigevent |
|
typedef union sigval |
例子1:
|
#include <aio.h> |
运行结果:
注意:要加相应的库,-lrt
|
$ ./gcc -o test aio_signal.c -lrt
$ ./test |
例子2:
|
#include <aio.h> |










