SpecSim Programmer Manual | ![]() ![]() |
native.h
The purpose of the native thread API is to abstract away the implementation detail of different multi-threading packages we might use, for example, the POSIX, the QuickThread package among others. While sharing a similar functionality, these packages differ in both performance and portability. Since choices of the multi-threading package to use on different platforms may vary, it is best that we establish an multi-threading API that can wrap around different packages. Furthermore, since the functionality we need and only need from the thread layer is a simple abstraction of execution context as well as the mechanism to perform non-preemptive context switch, we can use this API to mask away the other functionalities the package may provide, or to create the abstraction using the package's native primitives.
This section describes defines the native thread API.
generated by doc++