[PR #967] [MERGED] core: Add wrapper for calling into guest code. #1858

Closed
opened 2026-02-27 21:14:14 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/967
Author: @squidbus
Created: 9/17/2024
Status: Merged
Merged: 9/23/2024
Merged by: @georgemoralis

Base: mainHead: guest-call


📝 Commits (1)

  • 193e55b core: Add wrapper for calling into guest code.

📊 Changes

8 files changed (+57 additions, -35 deletions)

View changed files

📝 src/core/libraries/avplayer/avplayer.h (+14 -13)
📝 src/core/libraries/avplayer/avplayer_state.cpp (+8 -5)
📝 src/core/libraries/avplayer/avplayer_state.h (+2 -2)
📝 src/core/libraries/kernel/thread_management.cpp (+1 -7)
📝 src/core/libraries/network/net_ctl_obj.cpp (+8 -2)
📝 src/core/linker.cpp (+12 -4)
📝 src/core/linker.h (+9 -1)
📝 src/core/module.cpp (+3 -1)

📄 Description

Adds a wrapper for calling into guest code, allowing us to perform any required prologue or epilogue.

Currently this function just makes sure that the current thread has a patch stack and guest TLS set up before calling guest code. In the future it could be used for things like managing the FS segment on Linux.

Also fixes a type inconsistency in an AvPlayer callback which was causing type issues with the new wrapper.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/shadps4-emu/shadPS4/pull/967 **Author:** [@squidbus](https://github.com/squidbus) **Created:** 9/17/2024 **Status:** ✅ Merged **Merged:** 9/23/2024 **Merged by:** [@georgemoralis](https://github.com/georgemoralis) **Base:** `main` ← **Head:** `guest-call` --- ### 📝 Commits (1) - [`193e55b`](https://github.com/shadps4-emu/shadPS4/commit/193e55b0a062a804f2dd556c176cc11c7e6849d3) core: Add wrapper for calling into guest code. ### 📊 Changes **8 files changed** (+57 additions, -35 deletions) <details> <summary>View changed files</summary> 📝 `src/core/libraries/avplayer/avplayer.h` (+14 -13) 📝 `src/core/libraries/avplayer/avplayer_state.cpp` (+8 -5) 📝 `src/core/libraries/avplayer/avplayer_state.h` (+2 -2) 📝 `src/core/libraries/kernel/thread_management.cpp` (+1 -7) 📝 `src/core/libraries/network/net_ctl_obj.cpp` (+8 -2) 📝 `src/core/linker.cpp` (+12 -4) 📝 `src/core/linker.h` (+9 -1) 📝 `src/core/module.cpp` (+3 -1) </details> ### 📄 Description Adds a wrapper for calling into guest code, allowing us to perform any required prologue or epilogue. Currently this function just makes sure that the current thread has a patch stack and guest TLS set up before calling guest code. In the future it could be used for things like managing the FS segment on Linux. Also fixes a type inconsistency in an AvPlayer callback which was causing type issues with the new wrapper. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 21:14:14 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#1858
No description provided.