KasperskyOS Community Edition 1.1
Contents
Contents
KnIoPermitPort()
This function is declared in the coresrv/io/ports.h
file.
Retcode KnIoPermitPort(Handle rid, Handle *handle);
This function allows a process to access the port (range of ports) with the handle rid
.
Output parameter handle
contains the handle of this permission.
Returns rcOk if successful.
Example
static Retcode PortInit(IOPort *resource)
{
Retcode rc = rcFail;
rc = KnRegisterPorts(resource->base,
resource->size,
&resource->handle);
if (rc == rcOk)
rc = KnIoPermitPort(resource->handle, &resource->permitHandle);
resource->addr = (void *) (rtl_uintptr_t) resource->base;
return rc;
}