SEGMENT_DETACH
Purpose
segment_detach detaches a memory segment
from the running task's address space.
Synopsis
#include <types.h>
#include <stub.h>
int segment_detach(Capability
*segment);
Parameters
-
segment: the capability for the
segment to be detached.
Description
segment_detach detaches the memory
segment specified by segment from the running task's address space.
Return Values
On success, segment_detach returns
0.
On fail, segment_detach returns a negative
value indicating one of the following errors:
See Also
segment_create,
segment_destroy, segment_status,
segment_attach, segment_resize
Notes
The detached segment is not destroyed, even
if it is no longer attached to any task's address space. To destroy the
segment you must explicitly call segment_destroy.