Private
Public Access
2
0

gpio: add signal type to pthread_kill

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2014-05-13 22:18:46 +00:00
parent 5141d24565
commit 6811fe4a24

View File

@@ -29,6 +29,8 @@
#include <string.h>
#include <unistd.h>
#include <poll.h>
#include <pthread.h>
#include <signal.h>
#define SYSFS_CLASS_GPIO "/sys/class/gpio"
#define MAX_SIZE 64
@@ -211,7 +213,7 @@ maa_gpio_isr_exit(maa_gpio_context *dev)
return ret;
}
if (pthread_kill(dev->thread_id) != 0) {
if (pthread_kill(dev->thread_id, SIGTERM) != 0) {
ret = MAA_ERROR_INVALID_HANDLE;
}
if (close(dev->isr_value_fp) != 0) {