Example of MIO implementation by including the libmio.h header file
MIO can be implemented by adding the libmio.h header file to an application's source file in order to redirect I/O calls to the MIO library.
The following two lines would be added to the example.c file:
#define USE_MIO_DEFINES
#include "libmio.h"
This script sets the MIO environment variables,
compiles and links the application with the MIO library, and to calls it.#!/bin/csh
#
setenv MIO_STATS example.stats
setenv MIO_FILES " *.dat [ trace/stats ] "
setenv MIO_DEFAULTS " trace/kbytes "
setenv MIO_DEBUG OPEN
#
cc -o example example.c -lmio
#
./example file.dat