It's also possible to use the POSIX APIs in a limited fashion using, for example, the following:
| Name | Compliance |
|
Cygwin |
Mostly complete. Provides a full runtime environment for a POSIX application, which can be distributed as a normal Windows application. |
|
MinGW |
With MinGW-w64 (a redevelopment of MinGW), Pthreads support is fairly complete, though some functionality may be absent. |
|
Windows Subsystem for Linux |
WSL is a Windows 10 feature, which allows a Ubuntu Linux 14.04 (64-bit) image's tools and utilities to run natively on top of it though not those using GUI features or missing kernel features. Otherwise, it offers similar compliance as Linux. This feature currently requires that one runs the Windows 10 Anniversary Update and install WSL by hand using instructions provided by Microsoft. |
POSIX on Windows is generally not recommended. Unless there are good reasons to use POSIX (large existing code base, for example), it's far easier to use one of the cross-platform APIs (covered later in this chapter), which smooth away any platform issues.
In the following sections, we'll look at the features offered by the Pthreads API.