PatchworkOS  2ca1c69
A non-POSIX operating system.
Loading...
Searching...
No Matches
io.c File Reference
#include <kernel/cpu/io.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 io.c:

Go to the source code of this file.

Functions

static BITMAP_CREATE (ports, IO_PORT_MAX+1)
 
uint64_t io_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 io_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  ,
IO_PORT_MAX 1 
)
static

Variable Documentation

◆ lock

lock_t lock = LOCK_CREATE()
static

Definition at line 13 of file io.c.