libgpiod: use a per-thread variable for storing errors
authorBartosz Golaszewski <bartekgola@gmail.com>
Mon, 2 Jan 2017 12:31:58 +0000 (13:31 +0100)
committerBartosz Golaszewski <bartekgola@gmail.com>
Mon, 2 Jan 2017 12:37:59 +0000 (13:37 +0100)
commit806ce83308aa0b45d9a7b2b7ebd47354c8e1ad63
tree021d520f61c372ef7a67d949651bdf7ba8804ec2
parent97c4b6d750ed65a52e3221741081f40e72ae1696
libgpiod: use a per-thread variable for storing errors

The kernel-like trick with embedding error numbers in pointers can't
be guaranteed to work on all architectures. Use a per-thread variable
instead and add corresponding routines to access it.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
core.c
gpiod.h
gpiodetect.c
gpioinfo.c
gpioset.c