Repository navigation
Conversation
Contributor
|
See #71 (comment) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The SDK already provides link stubs for the kernel memory and thread functions used by my homebrew ports, but each consumer has to supply its own C declarations. This adds
<ps5/libkernel.h>so those declarations can be shared.The header covers 20 existing exports: direct and flexible memory, virtual reservations and protection, the JIT shared-memory interface, timestamps, CPU affinity, and system-software version queries. It includes the associated constants and version record already used in my platform header.
<ps5/kernel.h>keeps its existing kernel-introspection role. This change adds no library, allocator, runtime behavior, or stub symbols. The normal header installation already picks up the new file.Example:
Validation
Compiled the header as C11 and C++11 with Clang 23.1.1 targeting PS5, with
-Wall -Wextra -Werror. Checked the version record's size (40 bytes) and version-field offset (36). A test object takes the address of every declaration; all 20 names remain unmangled in C++, matchlibkernel_webstubs, and link into a normal SDK payload.Draft: these checks establish source and link compatibility with the existing downstream declarations. They do not independently verify every function signature on every firmware. In particular, an exported JIT API can still be refused by the process's privileges. Header placement, naming, and ABI coverage are open for review before this is treated as a stable public interface.
Refs #70.