xiaoxiang781216 commented on a change in pull request #5736: URL: https://github.com/apache/incubator-nuttx/pull/5736#discussion_r827957763
########## File path: drivers/input/touchscreen_upper.c ########## @@ -366,34 +350,40 @@ static int touch_poll(FAR struct file *filep, void touch_event(FAR void *priv, FAR const struct touch_sample_s *sample) { FAR struct touch_upperhalf_s *upper = priv; + FAR struct touch_openpriv_s *openpriv; int semcount; if (nxsem_wait(&upper->exclsem) < 0) { return; } - circbuf_overwrite(&upper->buffer, sample, - SIZEOF_TOUCH_SAMPLE_S(sample->npoints)); - touch_notify(upper, POLLIN); - nxsem_get_value(&upper->buffersem, &semcount); - if (semcount < 1) + list_for_every_entry(&upper->head, openpriv, struct touch_openpriv_s, node) { - nxsem_post(&upper->buffersem); + circbuf_overwrite(&openpriv->circbuf, sample, + SIZEOF_TOUCH_SAMPLE_S(sample->npoints)); + + nxsem_get_value(&openpriv->waitsem, &semcount); + if (semcount < 1) Review comment: it could avoid poll/read wake up multiple time but the fifo is empty. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org