Files
codezero/docs/man/man7/l4_unmap.7
Bahadir Balban 5b783f4e2e Update to manual pages.
Introduced an ENOMAP error code for l4_unmap.
2009-12-04 00:30:25 +02:00

47 lines
1.3 KiB
Groff
Executable File

.TH L4_UNMAP 7 2009-11-02 "Codezero" "Codezero Programmer's Manual"
.SH NAME
.nf
.BR "l4_unmap" " - removes virtual to physical address mappings."
.SH SYNOPSIS
.nf
.B #include <l4lib/arch/syscalls.h>
.B #include <l4lib/arch/syslib.h>
.BI "int l4_unmap(void " "*virtual" ", unsigned long " "npages" ", l4id_t " "tid" ")"
.SH DESCRIPTION
.B l4_unmap()
.RI "removes a virtual to physical mapping from the address space of the thread identified by " "tid " "starting from virtual address " "virtual" ", and spanning " "npages" " number of pages."
.SH L4 USERSPACE LIBRARY
.nf
/*
* Unmaps the given virtual address from current address space
* spanning npages number of pages. Returns negative value
* if the address was already unmapped.
*/
.BI "static inline void *l4_unmap_helper(void " "*virt" ", int " "npages" ");"
.fi
.SH RETURN VALUE
.BR "l4_unmap"()
returns 0 on success, and negative value on failure. See below for error codes.
.SH ERRORS
.B -ESRCH
The thread to remove the mapping could not be found on the system.
.B -ENOCAP
Capabilities required don't exist or caller do not have sufficient privileges.
.B -1
There is already an unmapped area in one of the pages that were unmapped. This may or may not be an error, depending on what state the caller expects the unmapped area to be in.
.SH SEE ALSO
.BR "l4_map"(7)