Age | Commit message (Collapse) | Author |
|
Highlights for this change:
- usbi_default_context is only set if libusb_init() is called with NULL.
- All hotplug related functionality (e.g. initialization, processing) has been
moved to hotplug.c
- Backends are simplified by removing initialization mutexes. Mutual exclusion
between init()/exit() is provided by default_context_lock.
- Make hotplug types and functions part of libusbi.h with the common usbi_
prefixes (removes hotplug.h).
Addresses issue highlighted in #855
Closes #856
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
Signed-off-by: Nathan Hjelm <hjelmn@google.com>
|
|
The way in which system handles or resources are represented differs
greatly between Unix-like operating systems and Windows. Ever since
Windows support was added to libusb, Windows been emulating principles
of Unix-like operating systems such as file descriptors and poll().
This commit introduces an abstraction layer that completely removes the
need to perform any emulation. Fundamentally there are three things that
each platform provides to libusb:
1) A signallable event
2) A timer (not required, but useful)
3) A means to wait for event sources such as the above to be triggered
The POSIX abstraction for Unix-like operating systems uses file
descriptors as the "handles" to the underlying system resources. The
signallable event is implemented using a pipe, the timer as a timerfd
(where supported) and the poll() system call is used to wait for events.
The Windows abstraction uses native HANDLEs as the "handles" to the
underlying system resources. The signallable event is implemented using
a manual-reset event, the timer as a manual-reset waitable timer, and
the WaitForMultipleObjects() system call is used to wait for events.
Closes #252
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
Since Visual Studio picks the first project as the default startup
project, move the library projects back to the top of the list. This use
to be the order but was changed in commit 9843b689df.
Add the project filter files to help organize the source files within
the Solution Explorer window pane.
Additionally move the getopt source underneath the msvc directory since
it is only used for Visual Studio builds.
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|