asynchronous I/O to two I/O ports

I need to receive data from two different serial ports simultanenously in linux c++. I would like set up my I/O to cause some sort of interrupt so that I can sit in a wait until an interrupt comes in (meanining one of the I/O ports has data). I want to wake up and read the data from the correct port (I have to know which port it is coming from) and process the data, Then I want to go back to my wait (waiting for the next I/O to come in).

How do I set up my interrupts and what do I use to wait for the interrupt?

Thanks for your help,
Robert Pinsky
Unless you are writing a UART driver, the OS is going to manage interrupts for you. All you have to do is read from the serial devices, waiting for the data to show up. I understand that the Boost Asio library has some nice tools for doing serial I/O in C++.
You might want to investigate select():

http://linux.die.net/man/2/select
Yes, I remember using select when doing sockets. Its been a long time

Thanks
Topic archived. No new replies allowed.