Reading serial port at a 200 Hz rate

Issue: I have a device connected to my computers’ serial port (RS-232). The device is broadcasting 50 byte messages at a 200 Hz rate. I am using the devc-ser8250 driver with FIFO turned on. I have created an application that reads the messages from the serial port, but it is not optimum.

Question: What is the most efficient way to setup the interrupt to notify my application that there is data on the serial port ready to be read and then reset that process?
InterruptAttachEvent()/InterruptWait()/InterruptUnmask()
SIGEV_PULSE_INIT()/ionotify()/MsgSendPulse()/etc.
tcischars()…

Quote - I don’t remember the source of this:
{InterruptAttachEvent()} This approach has a major advantage over using a pulse. A pulse is delivered as a message to the resource manager, which means that if the resource manager’s message-handling threads are busy processing requests, the pulse will be queued until a thread does a MsgReceive().

Thank you for your replies!
FD

Why notify the application of the interrupt? Create a thread that is always reading the port. It would be less efficient to read char by char, but you can. read_cond() provides a number of parameters to control how you get chunks of data in a timely manner. How you get the data to your main thread is up to you. Send a message or a pulse, load a buffer and use a cond_var, raise a signal. Whatever works best for your application.

OK use io_notify()/select() to be informed when there is data in the buffer