PatchworkOS  19e446b
A non-POSIX operating system.
Loading...
Searching...
No Matches
port.c File Reference
#include <kernel/cpu/port.h>
#include <kernel/sync/lock.h>
#include <kernel/log/log.h>
#include <errno.h>
#include <stdbool.h>
#include <stddef.h>
#include <sys/bitmap.h>
#include <sys/list.h>
Include dependency graph for port.c:

Go to the source code of this file.

Functions

static BITMAP_CREATE (ports, PORT_MAX+1)
 
uint64_t port_reserve (port_t *out, port_t minBase, port_t maxBase, uint64_t alignment, uint64_t length, const char *owner)
 Find and reserve a range of I/O ports if available.
 
void port_release (port_t base, uint64_t length)
 Release a previously reserved range of I/O ports.
 

Variables

static lock_t lock = LOCK_CREATE()
 

Function Documentation

◆ BITMAP_CREATE()

static BITMAP_CREATE ( ports  ,
PORT_MAX 1 
)
static

Variable Documentation

◆ lock

lock_t lock = LOCK_CREATE()
static

Definition at line 13 of file port.c.