summaryrefslogtreecommitdiffstats
path: root/contrib/netbsd-tests/lib/libc/stdlib/h_getopt_long.c
diff options
context:
space:
mode:
authorloos <loos@FreeBSD.org>2014-10-31 19:15:14 +0000
committerloos <loos@FreeBSD.org>2014-10-31 19:15:14 +0000
commit7106eeab9b897cca307b144b5c8a2715a2d61251 (patch)
tree68a76ee179186bb64125eebd8815befa7fc7b92a /contrib/netbsd-tests/lib/libc/stdlib/h_getopt_long.c
parent2ccd430671b61ececedeb3a8df0addebd9e808b3 (diff)
downloadFreeBSD-src-7106eeab9b897cca307b144b5c8a2715a2d61251.zip
FreeBSD-src-7106eeab9b897cca307b144b5c8a2715a2d61251.tar.gz
Fix the gpiobus locking by using a more sane model where it isn't necessary
hold the gpiobus lock between the gpio calls. gpiobus_acquire_lock() now accepts a third parameter which tells gpiobus what to do when the bus is already busy. When GPIOBUS_WAIT wait is used, the calling thread will be put to sleep until the bus became free. With GPIOBUS_DONTWAIT the calling thread will receive EWOULDBLOCK right away and then it can act upon. This fixes the gpioiic(4) locking issues that arises when doing multiple concurrent access on the bus.
Diffstat (limited to 'contrib/netbsd-tests/lib/libc/stdlib/h_getopt_long.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud