# CloseItem

Closes a system item.

### Synopsis

`Err CloseItem( Item i )`

### Description

System items are items that are created automatically by the operating system, such as folios and device drivers, and thus do not need to be created by tasks. To use a system item, a task first opens it by calling `OpenItem()`. When a task is done using a system item, it calls `CloseItem()` to inform the operating system that it is no longer using the item.

### Arguments

i
  Number of the item to close.

### Return Value

The procedure returns 0 if the item was closed successfully or an error code (a negative value) if an error occurs. Possible error codes include:

BADITEM
  The i argument is not an item.

ER_Kr_ItemNotOpen
  The i argument is not an opened item.

### Implementation

SWI implemented in kernel folio V20.

### Associated Files

item.h
  ANSI C Prototype

### See Also

``OpenItem`()`

#