hotplug docs: align the header contract and the NetBSD stub with the backends #835
No reviewers
Labels
No labels
3rdparty
Android
API
Author does not respond
bsd
bug
build system/CI
ci-virtual-device
CMake
Contributions Welcome
Core
dependencies
device-specific
documentation
don't_merge
duplicate
enhancement
Example
Haiku
hidraw
hotplug
info required
invalid
libusb
macOS
Misc
Not an issue
question
Release
Test
Test GUI
Windows
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-libusb/hidapi!835
Loading…
Reference in a new issue
No description provided.
Delete branch "hotplug-docs-consistency"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Documentation-only follow-up to the async
HID_API_HOTPLUG_ENUMERATEwork (#822, #823, #824, #825, #826). A fresh two-family review of the hotplug feature (Claude Fable 5.1 and gpt-6-astra, reviewing the header against all four backend implementations) found thehidapi.hcontract and the NetBSD stub out of step with what the backends actually do. This PR brings the documentation back in line; no backend behavior changes.hidapi/hidapi.hhid_hotplug_register_callback()as an implicit initializer, document the macOS thread-ownership consequence of implicit initialization, require serializedhid_open*()after explicit initialization, and spell out thehid_exit()ordering relative to registered callbacks and in-flight deliveries.netbsd/hid.cThe stub returns -1 and zeroes
*callback_handleforhid_hotplug_register_callback()as documented, but no longer writes the global error string through the unsynchronized helper, since the hotplug calls are documented thread-safe. The header now says that backends without hotplug support leave the error string untouched.Review
Findings were merged from both review families and cross-filed: items that concern backend code were fixed on the backend PRs; the ones that concern the contract text landed here. CI (Builds) is green on this branch, and the branch is part of the CI aggregate on #830 together with the five feature branches.
Assisted-by: claude-code:claude-fable-5-1
Assisted-by: codex-cli:gpt-6-astra
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.