Jump to content

DevHlp AcquireSpinLock: Difference between revisions

From EDM2
Created page with "{{DISPLAYTITLE:DevHlp_AcquireSpinLock}} Acquire a subsystem spinlock. This function obtains ownership of a subsystem spinlock. ==Parameters== Spinlock handle. ==Return code== Exit ==Example Code== ;Assembly language ; dh_AcquireSpinLock - Acquire a subsystem spinlock ; ; Obtains ownership of a subsystem spinlock. Used by device drivers. ; ; ENTRY: AX:BX = spinlock handle ; ; EXIT: None ; ; USES..."
 
No edit summary
 
(One intermediate revision by one other user not shown)
Line 4: Line 4:
This function obtains ownership of a subsystem spinlock.
This function obtains ownership of a subsystem spinlock.


==Syntax==
DevHlp_AcquireSpinLock(spl)
==Parameters==
==Parameters==
Spinlock handle.
;spl (HSpinLock) - input: Spinlock handle.


==Return code==
==Return code==
Line 27: Line 29:
       MOV    AX,hSpinLockHighWord        ; high word of handle
       MOV    AX,hSpinLockHighWord        ; high word of handle
       MOV    BX,hSpinLockLowWord          ; low word of handle
       MOV    BX,hSpinLockLowWord          ; low word of handle
       MOV    DL,DevHlp_AcquireSpinLock    ;
       MOV    DL,DevHlp_AcquireSpinLock    ; 71h
       CALL    DevHlp
       CALL    DevHlp
       JC      Error
       JC      Error

Latest revision as of 04:10, 28 May 2025

Acquire a subsystem spinlock.

This function obtains ownership of a subsystem spinlock.

Syntax

DevHlp_AcquireSpinLock(spl)

Parameters

spl (HSpinLock) - input
Spinlock handle.

Return code

Exit

Example Code

Assembly language
    ;       dh_AcquireSpinLock - Acquire a subsystem spinlock ;
    ;       Obtains ownership of a subsystem spinlock. Used by device drivers.
    ;
    ;       ENTRY:  AX:BX = spinlock handle
    ;
    ;       EXIT:   None
    ;
    ;       USES:   Flags
    ;

      hSpinLock       dd      ?            ; 16:16

      MOV     AX,hSpinLockHighWord         ; high word of handle
      MOV     BX,hSpinLockLowWord          ; low word of handle
      MOV     DL,DevHlp_AcquireSpinLock    ; 71h
      CALL    DevHlp
      JC      Error