Nicola
Nicola

Reputation: 405

Alternative to the poll function to check new data in a FIFO

I'm writing a method to check if there is new data in a FIFO opened in RDONLY mode. Until now I was using the poll() function but I realized that the kernel on which the code will run doesn't have this function and it implements a subset of the Linux functionality and a subset of the POSIX functionality.

There are alternatives to the poll function?

(In particular, the machine is a BlueGene/Q and the functionalities offered can be found in the Application Development Redbook under the chapter Kernel access.)

Review: Reading better the redbook I realized that the poll call is included in the kernel. I leave anyway the question because the reply can be useful to someone else.

Upvotes: 1

Views: 415

Answers (1)

chrk
chrk

Reputation: 4215

Check if select(2) is available, it should fit for your needs.

It performs a similar task to poll(2).

Upvotes: 1

Related Questions