\begin{figure}[!htb]
\footnotesize \centering
\begin{minipage}[c]{15cm}
- \begin{lstlisting}[labelstep=0]{}%,frame=,indent=1cm]{}
+ \begin{lstlisting}[stepnumber=0]{}
struct pollfd {
int fd; /* file descriptor */
short events; /* requested events */
di I/O, che prevede anche l'introduzione di un nuovo layer per l'I/O
asincrono (effettuato a partire dal 2.5.32).} esiste una sola versione
stabile di questa interfaccia, quella delle \acr{glibc}, che รจ realizzata
-completamente in user space. Esistono comunque vari progetti sperimentali
-(come il KAIO della SGI, o i patch di Benjamin La Haise) che prevedono un
-supporto diretto da parte del kernel.
+completamente in user space, ed accessibile linkando i programmi con la
+libreria \file{librt}. Esistono comunque vari progetti sperimentali (come il
+KAIO della SGI, o i patch di Benjamin La Haise) che prevedono un supporto
+diretto da parte del kernel.
Lo standard prevede che tutte le operazioni di I/O asincrono siano controllate
attraverso l'uso di una apposita struttura \struct{aiocb} (il cui nome sta per
\begin{figure}[!htb]
\footnotesize \centering
\begin{minipage}[c]{15cm}
- \begin{lstlisting}[labelstep=0]{}%,frame=,indent=1cm]{}
+ \begin{lstlisting}[stepnumber=0]{}
struct aiocb
{
int aio_fildes; /* File descriptor. */
\begin{figure}[!htb]
\footnotesize \centering
\begin{minipage}[c]{15cm}
- \begin{lstlisting}[labelstep=0]{}%,frame=,indent=1cm]{}
+ \begin{lstlisting}[stepnumber=0]{}
struct sigevent
{
sigval_t sigev_value;
\begin{figure}[!htb]
\footnotesize \centering
\begin{minipage}[c]{15cm}
- \begin{lstlisting}[labelstep=0]{}%,frame=,indent=1cm]{}
+ \begin{lstlisting}[stepnumber=0]{}
struct iovec {
__ptr_t iov_base; /* Starting address */
size_t iov_len; /* Length in bytes */
\begin{figure}[!bht]
\footnotesize \centering
\begin{minipage}[c]{15cm}
- \begin{lstlisting}[labelstep=0]{}%,frame=,indent=1cm]{}
+ \begin{lstlisting}[stepnumber=0]{}
struct flock {
short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
- short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek').*/
off_t l_start; /* Offset where the lock begins. */
- off_t l_len; /* Size of the locked area; zero means until EOF. */
+ off_t l_len; /* Size of the locked area; zero means until EOF.*/
pid_t l_pid; /* Process holding the lock. */
};
\end{lstlisting}