diff options
| author | Freya Murphy <freya@freyacat.org> | 2024-01-27 02:14:19 -0500 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2024-01-27 02:14:19 -0500 |
| commit | 2747693fdb5aa334d8b00a04ed81d2234d710ba9 (patch) | |
| tree | 47dad3fd0edac691126e261832a304c3125cd679 /include | |
| parent | create bindings.h (diff) | |
| download | corn-2747693fdb5aa334d8b00a04ed81d2234d710ba9.tar.gz corn-2747693fdb5aa334d8b00a04ed81d2234d710ba9.tar.bz2 corn-2747693fdb5aa334d8b00a04ed81d2234d710ba9.zip | |
acpi + lib
Diffstat (limited to 'include')
| -rw-r--r-- | include/acpi.h | 23 | ||||
| -rw-r--r-- | include/lib.h | 12 |
2 files changed, 35 insertions, 0 deletions
diff --git a/include/acpi.h b/include/acpi.h new file mode 100644 index 0000000..637ccd2 --- /dev/null +++ b/include/acpi.h @@ -0,0 +1,23 @@ + +enum acpi_status { + ACPI_SUCCESS = 0, + ACPI_FAILURE = -1, + ACPI_MALFORMED_TABLE = -2, + ACPI_OLD_VERSION = -4, + ACPI_S5_PARSE_ERROR = -5, +}; + +/** + * Loads the ACPI tables + * https://en.wikipedia.org/wiki/ACPI + * @param rsdp - pointer to the Root System Description Pointer + * usually passed from the bootlater + * @returns ACPI_SUCCESS on success + */ +int acpi_init(void *rsdp); + +/** + * Shutdowns down the system + * @returns ACPI_FAILURE on failure + */ +int acpi_shutdown(void); diff --git a/include/lib.h b/include/lib.h new file mode 100644 index 0000000..4271aa5 --- /dev/null +++ b/include/lib.h @@ -0,0 +1,12 @@ + +/** + * The strcmp() function compares the two strings s1 and s2. The locale is not taken into account + * (for a locale-aware comparison, see strcoll(3)). The comparison is done using unsigned characters. + */ +int strncmp(const char *s1, const char *s2, unsigned long n); + +/** + * The memcmp() function compares the first n bytes (each interpreted as unsigned char) of the memory + * areas s1 and s2. + */ +int memcmp(const void *s1, const void *s2, unsigned long n); |