diff options
author | Chris Dickens <christopher.a.dickens@gmail.com> | 2016-01-30 02:24:38 -0800 |
---|---|---|
committer | Chris Dickens <christopher.a.dickens@gmail.com> | 2016-02-24 10:43:39 -0800 |
commit | a05b282bee6998da3d1a8460b33dc24b69682fb7 (patch) | |
tree | ec6a241144eedddd6d17c974f4079f73a380d078 | |
parent | b99391deb4894bbfff59fab985c99fc55a43169a (diff) | |
download | libusb-a05b282bee6998da3d1a8460b33dc24b69682fb7.tar.gz |
Misc: Remove unused definitions for usbi_cond_signal()
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
-rw-r--r-- | libusb/os/threads_posix.h | 1 | ||||
-rw-r--r-- | libusb/os/threads_windows.c | 19 | ||||
-rw-r--r-- | libusb/os/threads_windows.h | 1 | ||||
-rw-r--r-- | libusb/version_nano.h | 2 |
4 files changed, 1 insertions, 22 deletions
diff --git a/libusb/os/threads_posix.h b/libusb/os/threads_posix.h index 3caeca4..ce78cc3 100644 --- a/libusb/os/threads_posix.h +++ b/libusb/os/threads_posix.h @@ -41,7 +41,6 @@ #define usbi_cond_timedwait pthread_cond_timedwait #define usbi_cond_broadcast pthread_cond_broadcast #define usbi_cond_destroy pthread_cond_destroy -#define usbi_cond_signal pthread_cond_signal #define usbi_tls_key_t pthread_key_t #define usbi_tls_key_create pthread_key_create diff --git a/libusb/os/threads_windows.c b/libusb/os/threads_windows.c index 933807e..8a9c02c 100644 --- a/libusb/os/threads_windows.c +++ b/libusb/os/threads_windows.c @@ -155,25 +155,6 @@ int usbi_cond_broadcast(usbi_cond_t *cond) return fail ? EINVAL : 0; } -int usbi_cond_signal(usbi_cond_t *cond) -{ - // Assumes mutex is locked; this is not in keeping with POSIX spec, but - // libusb does this anyway, so we simplify by not adding more sync - // primitives to the CV definition! - struct usbi_cond_perthread *pos; - - if (!cond) - return EINVAL; - if (list_empty(&cond->waiters)) - return 0; // no one to wakeup. - pos = list_first_entry(&cond->waiters, struct usbi_cond_perthread, list); - // The wait function will remove its respective item from the list. - if (SetEvent(pos->event)) - return 0; - else - return EINVAL; -} - __inline static int usbi_cond_intwait(usbi_cond_t *cond, usbi_mutex_t *mutex, DWORD timeout_ms) { diff --git a/libusb/os/threads_windows.h b/libusb/os/threads_windows.h index 39dddc8..b9e7922 100644 --- a/libusb/os/threads_windows.h +++ b/libusb/os/threads_windows.h @@ -66,7 +66,6 @@ int usbi_cond_wait(usbi_cond_t *cond, usbi_mutex_t *mutex); int usbi_cond_timedwait(usbi_cond_t *cond, usbi_mutex_t *mutex, const struct timespec *abstime); int usbi_cond_broadcast(usbi_cond_t *cond); -int usbi_cond_signal(usbi_cond_t *cond); int usbi_cond_destroy(usbi_cond_t *cond); int usbi_tls_key_create(usbi_tls_key_t *key, void (*destructor)(void *)); diff --git a/libusb/version_nano.h b/libusb/version_nano.h index 9be763f..ec8f802 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 11058 +#define LIBUSB_NANO 11059 |