KhronosGroup / KSCAF_DocRequirements

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

Explicitly define behavior of asynchronous calls (Bug 15992) #9

Closed DeOrellana closed 7 years ago

DeOrellana commented 7 years ago

Erik Noreke 2016-08-30 00:56:07 PDT

Asynchronous calls need to be described explicitly as to what happens during the initial call and what happens after the initial call returns. This includes defining when parameters passed to the asynchronous call are available to be changed by the application and which parameters, such as buffers, are not to be changed by the application until the asynchronous call returns. All asynchronous calls must notify the application upon completion.

Comment 1 Daniel Herring 2016-09-19 07:32:41 PDT

Notification of the application should not be asynchronous, i.e. should not use interrupts. Allow polling of the state notification parameter.

Comment 2 Erik Noreke 2016-09-19 07:34:38 PDT

Accepted per call 2016-09-19

"The application must be able to know when the asynchronous call has been completed."

Comment 3 Erik Noreke 2016-09-20 13:07:25 PDT

Setting QA contact to non-member SCAP mailing list.

Comment 4 Erik Noreke 2016-09-26 07:20:22 PDT

Accepted as requirement per call 2016-09-26

Comment 5 Erik Noreke 2016-10-03 07:32:38 PDT

Assigning to Daniel per call 20161003.

Comment 6 Daniel Herring 2016-10-31 18:22:25 PDT

Asynchronous calls are those which are initiated by the program but may not execute or use their parameter data until a later time. Safety Critical APIs shall be clearly define when any parameter data is used, especially data which is passed via reference or pointer. When pointers are used for output parameters to Asynchronous functions the API shall clearly define when the data is copied to the output parameter. If the output data is populated after an asynchronous event the API shall define a means by which the program can check to validate the data has been written to the output. If a pointer is used for an input to the function the API shall define when the data is used and when that buffer may be reused by the application.

The API shall also define when the parameters can be changed and reused by the program. When API internal data structures are used by a program the life of the variable shall be defined; including when the internal data structure can be reused, if the data must be in the data structure prior to a specific call, and if the data is changed in a way that the application can view the change.

All asynchronous function shall provide a mean to allow the application to determine completion of the function.

Comment 7 Erik Noreke 2016-11-07 07:54:23 PST

Per teleconference 2016-11-07 Illya to integrate to main document.