The Linux Programming Interface
Alternative I/O Models 1357 The fd argument identifies which of the file descriptors in the interest list is to have its setting ...
1358 Chapter 63 Listing 63-4 shows an example of the use of epoll_create() and epoll_ctl(). Listing 63-4: Using epoll_create() a ...
Alternative I/O Models 1359 descriptor associated with this event. Thus, when we make the epoll_ctl() call that places a file de ...
1360 Chapter 63 The EPOLLONESHOT flag By default, once a file descriptor is added to an epoll interest list using the epoll_ctl( ...
Alternative I/O Models 1361 described in Section 44.7.) In the other window, we run instances of cat(1) that write data to these ...
1362 Chapter 63 Listing 63-5: Using the epoll API ––––––––––––––––––––––––––––––––––––––––––––––––––––––– altio/epoll_input.c #i ...
Alternative I/O Models 1363 printf("Ready: %d\n", ready); /* Deal with returned list of events */ u for (j = 0; j < ready; j+ ...
1364 Chapter 63 as the epfd argument in a call to epoll_ctl(). Similarly, we can retrieve items from the ready list by specifyin ...
Alternative I/O Models 1365 63.4.5 Performance of epoll Versus I/O Multiplexing Table 63-9 shows the results (on Linux 2.6.25) w ...
1366 Chapter 63 insignificant compared to the time required for the system call to monitor N descriptors. Table 63-9 doesn’t inc ...
Alternative I/O Models 1367 As we noted in Section 63.1.1, edge-triggered notification is usually employed in conjunction with n ...
1368 Chapter 63 63.5 Waiting on Signals and File Descriptors Sometimes, a process needs to simultaneously wait for I/O to become ...
Alternative I/O Models 1369 file descriptor that is monitored (along with other file descriptors) using select(), poll(), or epo ...
1370 Chapter 63 Listing 63-8: Using pselect() sigset_t emptyset, blockset; struct sigaction sa; sigemptyset(&blockset); siga ...
Alternative I/O Models 1371 The signal handler is installed after creating the pipe, in order to prevent the race condition tha ...
1372 Chapter 63 /* ... Initialize 'timeout', 'readfds', and 'nfds' for select() */ if (pipe(pfd) == -1) errExit("pipe"); FD_SET( ...
Alternative I/O Models 1373 63.6 Summary In this chapter, we explored various alternatives to the standard model for per- formin ...
1374 Chapter 63 Further information [Stevens et al., 2004] describes I/O multiplexing and signal-driven I/O, with partic- ular e ...
PSEUDOTERMINALS A pseudoterminal is a virtual device that provides an IPC channel. On one end of the channel is a program that e ...
1376 Chapter 64 Furthermore, a terminal-oriented program expects a terminal driver to per- form certain kinds of processing of i ...
«
66
67
68
69
70
71
72
73
74
75
»
Free download pdf