]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
twsi: use tsleep instead of pause for better responsiveness
authorAndriy Gapon <avg@FreeBSD.org>
Mon, 7 Sep 2020 06:29:41 +0000 (06:29 +0000)
committerAndriy Gapon <avg@FreeBSD.org>
Mon, 7 Sep 2020 06:29:41 +0000 (06:29 +0000)
commite21a4ccfd1fd41dca59e89002f336adf554ad897
treee50decdb256722118ad02e03f577a1ebf7d5bf98
parentc3a7328be8b3269c49e3aa1fe29783f0c21d1e55
twsi: use tsleep instead of pause for better responsiveness

wakeup() does not have any effect on pause(), so if a transfer was
not finished by the time of the first check, then the thread
would sleep full 30 ms.

To do: protect the transfer and interrupt code with the mutex,
switch from tsleep from msleep

Reviewed by: manu
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D26309
sys/dev/iicbus/twsi/twsi.c