15.8 Exercise: Implementing Pipes with Message Queues

Team-FLY

Formulate a specification of a software pipe implementation in terms of message queues. Implement the following functions.

 pipe_t *pipe_open(void); int pipe_read(pipe_t *p, char *buf, int chars); int pipe_write(pipe_t *p, char *buf, int chars); int pipe_close(pipe_t *p); 

Design a pipe_t structure to fit the implementation. Test the implementation as described in Section 15.7.

Team-FLY


Unix Systems Programming
UNIX Systems Programming: Communication, Concurrency and Threads
ISBN: 0130424110
EAN: 2147483647
Year: 2003
Pages: 274

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net