nasa / osal

The Core Flight System (cFS) Operating System Abstraction Layer (OSAL)
Apache License 2.0
557 stars 218 forks source link

SemGetInfo partial success cases #1440

Open skliper opened 10 months ago

skliper commented 10 months ago

Is your feature request related to a problem? Please describe. OS_BinSemGetInfo and OS_CountSemGetInfo fill in the following structures: https://github.com/nasa/osal/blob/1a8823f2dc93da2bcb3696c92c7aee4f512ed4f7/src/os/inc/osapi-binsem.h#L38-L44 https://github.com/nasa/osal/blob/1a8823f2dc93da2bcb3696c92c7aee4f512ed4f7/src/os/inc/osapi-countsem.h#L32-L37

Where name and creator may be valid but not all implementations fill in value (ex. RTEMS): https://github.com/nasa/osal/blob/1a8823f2dc93da2bcb3696c92c7aee4f512ed4f7/src/os/rtems/src/os-impl-binsem.c#L275-L279

Note the following PR changes the RTEMS return to OS_ERR_NOT_IMPLEMENTED

Describe the solution you'd like Consider splitting the API into 2 or 3. GetValue could return value or unimplemented error. GetName/GetCreator or similar could return the other two.

Describe alternatives you've considered None

Additional context Partial success API's are not user friendly and should be avoided.

Requester Info Jacob Hageman - NASA/GSFC