vm_gudet Kernel Service

Purpose

Removes a region attached with vm_guatt from the current process's address space.

Syntax

#include <sys/types.h>
#include <sys/errno.h>
#include <sys/vmuser.h>

int vm_gudet (kaddr, uaddr, size, flags)
void * kaddr;
void * uaddr;
vmsize_t size;
long flags;

Parameters

Item Description
kaddr Kernel address attached by vm_guatt.
uaddr Location in the process address space where the kernel region was attached.
size Length of the attached region, in bytes.
flags Type of vm_gudet operation, must be VU_ANYWHERE.

Description

vm_gudet is a kernel service that detaches a region of global kernel memory that was attached by vm_guatt. This memory must still be allocated, detaching a region after it has been deallocated with vm_gfree is an error. If the detach is successful, the global kernel memory region at kaddr will no longer be addressable at uaddr by the calling process.

Execution Environment

The vm_gudet kernel service can be called from the process environment only.

Return Values

Item Description
0 User address detached successfully.
EINVAL Indicates one of the following errors:
  • Invalid flags.
  • Region indicated by kaddr and size does not lie within a region allocated by vm_galloc.

Implementation Specifics

The vm_gudet kernel service is part of Base Operating System (BOS) Runtime.