Err DeleteItem( Item i )
DeleteItem()
accepts the item number of the item to delete. It returns 0 if successful, or an error code (a negative value) if an error occurs.
Only use DeleteItem()
to delete items created with CreateItem().
If you've used a convenience call to create an item, you must use the corresponding deletion routine. A task must own an item to delete it.
Once an item is deleted, the kernel does not reuse the item number when it creates new items, to maintain the integrity of items. When a task tries to use an item number for a deleted item, the kernel informs the task that the item no longer exists.