Jira: None
Test: poll status is available to caller
Signed-off-by: Munish Bhardwaj <munishx.bhardwaj@intel.com>
namespace hwcomposer {
-void HWCPoll(int fd, int timeout) {
+int HWCPoll(int fd, int timeout) {
CTRACE();
+ int ret;
struct pollfd fds[1];
fds[0].fd = fd;
fds[0].events = POLLIN;
- if (poll(fds, 1, timeout) <= 0) {
+ if ((ret = poll(fds, 1, timeout)) <= 0) {
ETRACE("Poll Failed in HWCPoll %s", PRINTERROR());
}
+ return ret;
}
} // namespace hwcomposer
// Call poll() on fd.
// - timeout: time in miliseconds to stay blocked before returning if fd
// is not ready.
-void HWCPoll(int fd, int timeout);
+int HWCPoll(int fd, int timeout);
} // namespace hwcomposer