#include <unistd.h>
#include <linux/uhid.h>
#include <unistd.h>
+#include "osi/include/osi.h"
#include "btif_hh.h"
#include "bta_api.h"
#include "bta_hh_api.h"
/*Internal function to perform UHID write and error checking*/
static int uhid_write(int fd, const struct uhid_event *ev)
{
- ssize_t ret = write(fd, ev, sizeof(*ev));
+ ssize_t ret;
+ OSI_NO_INTR(ret = write(fd, ev, sizeof(*ev)));
if (ret < 0){
int rtn = -errno;
APPL_TRACE_ERROR("%s: Cannot write to uhid:%s",
btif_hh_device_t *p_dev = arg;
APPL_TRACE_DEBUG("%s: Thread created fd = %d", __FUNCTION__, p_dev->fd);
struct pollfd pfds[1];
- int ret;
pfds[0].fd = p_dev->fd;
pfds[0].events = POLLIN;
uhid_set_non_blocking(p_dev->fd);
while(p_dev->hh_keep_polling){
- ret = poll(pfds, 1, 50);
+ int ret;
+ OSI_NO_INTR(ret = poll(pfds, 1, 50));
if (ret < 0) {
APPL_TRACE_ERROR("%s: Cannot poll for fds: %s\n", __FUNCTION__, strerror(errno));
break;