KhronosGroup / KSCAF_DocRequirements

Khronos Safety Critical Advisory Forum’s minimum requirements for developing a safety critical technology specification.
3 stars 1 forks source link

Parallel execution of threads: specific, verifiable requirements shall replace "threadsafe" #30

Open bnaodovic opened 6 years ago

bnaodovic commented 6 years ago

API specification usually has requirement that the API should be “threadsafe” without defining or discussing this term. Instead of this requirement, there should be a set of specific and verifiable requirements related to using specific API data structures and functions in parallel threads. For example, there could be requirement that when ‘eglMakeCurrent’ is called and passed the same parameter values approximately simultaneously by two threads, then the later call will always fail, regardless of shortness of the time interval between the two calls. This kind of requirement would express absence of race conditions. An example of a more detailed discussion of some functions in parallel usage can be found in section 2.6, “Threading Behavior,” of Vulkan 1.1.78 - A Specification.

For reference, general issue "Parallel execution of thread" is defined as issue #29.