Table of Contents

LockItem

Locks an item.

Synopsis

int32 LockItem( Item s, uint32 flags )

Description

This procedure locks an item.

Note: Currently, semaphores are the only items that can be locked. You can lock semaphores by calling LockSemaphore().

Arguments

Only one flag is currently defined:

Return Value

The procedure returns 1 if the item was successfully locked. If the item is already locked and the SEM_WAIT flag is not set (which indicates that the calling task does not want to wait until the item is available), the procedure returns 0. If an error occurs, the procedure returns an error code.

Implementation

SWI implemented in kernel folio V20.

This is the same SWI as LockSemaphore()

Associated Files

See Also

DeleteItem(), UnlockItem()