aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2024-01-03 19:53:00 -0500
committerTormod Volden <debian.tormod@gmail.com>2024-01-19 20:31:47 +0100
commitf080aec7764da1b378e5ada712d0764ff5a79124 (patch)
treed131e9be164644a355353be614ab6f0751a772db
parent7719ae5632d0d9bc4d602dc16e25f626cdbfc494 (diff)
downloadlibusb-f080aec7764da1b378e5ada712d0764ff5a79124.tar.gz
Fix docs about backend functions that lock itransfer->lock
In 2013, commit 858b794c added a comment saying "This function gets called with the flying_transfers_lock locked". That appears to have changed with 138b661f. Commit 88778414 improved some stale comments, but missed these. It is clear in the code that the comment is no longer true. The function is *not* called with flying_transfers_lock locked, but it does lock itransfer->lock. References #1410
-rw-r--r--libusb/libusbi.h4
-rw-r--r--libusb/version_nano.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/libusb/libusbi.h b/libusb/libusbi.h
index eaa02ad..c6e032d 100644
--- a/libusb/libusbi.h
+++ b/libusb/libusbi.h
@@ -1351,7 +1351,7 @@ struct usbi_os_backend {
*
* This function must not block.
*
- * This function gets called with the flying_transfers_lock locked!
+ * This function gets called with itransfer->lock locked!
*
* Return:
* - 0 on success
@@ -1365,6 +1365,8 @@ struct usbi_os_backend {
* This function must not block. The transfer cancellation must complete
* later, resulting in a call to usbi_handle_transfer_cancellation()
* from the context of handle_events.
+ *
+ * This function gets called with itransfer->lock locked!
*/
int (*cancel_transfer)(struct usbi_transfer *itransfer);
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
index 762be6b..208969c 100644
--- a/libusb/version_nano.h
+++ b/libusb/version_nano.h
@@ -1 +1 @@
-#define LIBUSB_NANO 11866
+#define LIBUSB_NANO 11867