SetItemOwner

Changes the owner of an item.

Synopsis

Err SetItemOwner( Item i, Item newOwner )

Description

This procedure makes another task the owner of an item. A task must be the owner of the item to change its ownership. The item is removed from the current task's resource table and placed in the new owner's resource table.

You normally use this procedure to keep a resource available after the task that created it terminates.

Arguments

i
The item number of the item to give to a new owner.
newOwner
The item number of the new owner task.

Return Value

The procedure returns 0 if ownership of the item is changed or an error code if an error occurs.

Implementation

SWI implemented in kernel folio V20.

Associated Files

item.h
ANSI C Prototype

Caveats

This is not implemented for all items that should be able to have their ownership changed.

See Also

CreateItem(), FindItem(), DeleteItem()