DEENESPTFRRUARHIKOZHNL
CLASSIC Modul: os Rolle: constitutive Konfidenz: 95%

SNIP_CLASSIC_OS_SECTION_8_4_25_GetSpinlock

Quelle: SWS_OS.pdf (Seite 199) • Ziel-Anforderung: SWS_Os_00791

Wortlaut

8.4.25 GetSpinlock [SWS_Os_00686] Definition of API function GetSpinlock Upstream requirements: SRS_Os_80021 ⌈ Service Name GetSpinlock Syntax StatusType GetSpinlock ( SpinlockIdType SpinlockId ) Service ID [hex] 0x19 Sync/Async Synchronous Reentrancy Reentrant Parameters (in) SpinlockId The value refers to the spinlock instance that shall be locked. Parameters (inout) None Parameters (out) None Return value StatusType E_OK - In standard and extended status : No Error E_OS_ID - In extended status: The SpinlockId is invalid E_OS_INTERFERENCE_DEADLOCK - In extended status: A TASK tries to occupy the spinlock while the lock is already occupied by a TASK on the same core. This would cause a deadlock. E_OS_NESTING_DEADLOCK - In extended status: A TASK tries to occupy the spinlock while a TASK on the same core is holding a different spinlock in a way that may cause a deadlock. E_OS_ACCESS - In extended status: The spinlock cannot be accessed. Description GetSpinlock tries to occupy a spin-lock variable. If the function returns, either the lock is successfully taken or an error has occurred. The spinlock mechanism is an active polling mechanism. The function does not cause a de-scheduling. Available via Os.h ⌋ [SWS_Os_00687] Upstream requirements: SRS_Os_80021 ⌈The function GetSpinlock shall occupy a spinlock. If the spinlock is already occupied the function shall busy wait until the spinlock becomes available.⌋ [SWS_Os_00688] Upstream requirements: SRS_Os_80021 ⌈The function GetSpinlock shall return E_OK if no error was detected. The spinlock is now occupied by the calling Task/Category 2 ISR on the calling core.⌋ [SWS_Os_00689] Upstream requirements: SRS_Os_80021 ⌈The function GetSpinlock shall return E_OS_ID if the parameter SpinlockID refers to a spinlock that does not exist.⌋ [SWS_Os_00690] Upstream requirements: SRS_Os_80021 ⌈The function GetSpinlock shall return E_OS_INTERFERENCE_DEADLOCK if the spinlock referred by the parameter SpinlockID is already occupied by a Task/Category 2 ISR on the same core.⌋ [SWS_Os_00691] Upstream requirements: SRS_Os_80021 ⌈The function GetSpinlock shall return E_OS_NESTING_DEADLOCK if the sequence by which multiple spinlocks are occupied at the same time on one core do not comply with the configured order.⌋ [SWS_Os_00692] Upstream requirements: SRS_Os_80021 ⌈The function GetSpinlock shall return E_OS_ACCESS if the accessing OS-Application was not listed in the configuration (OsSpinlock).⌋ [SWS_Os_00693] Upstream requirements: SRS_Os_80021 ⌈It shall be allowed to call the function GetSpinlock while interrupts are disabled.⌋ [SWS_Os_00694] Upstream requirements: SRS_Os_80021 ⌈It shall be allowed to call the function GetSpinlock while a Resource is occupied.⌋

Versionen & Provenienz · Zugeordnete Anforderungen

Diese Angaben zeigt der Versions-Explorer.

Begründung & Zuweisungs-Evidenz

Cited verbatim in the snippet (deterministic citation).

Dokumenten-Herkunft & Rückverfolgbarkeit

Spezifikations-Dokument SWS_OS.pdf
Dokumentseite Seite 199
Ziel-Modul os (classic)
Ziel-Anforderung SWS_Os_00791
Semantische Rolle constitutive
Automatisierungs-Konfidenz 0.95