[PR #1671] [MERGED] The way to Unity, pt.2 #2236

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/1671
Author: @polybiusproxy
Created: 12/5/2024
Status: Merged
Merged: 12/6/2024
Merged by: @polybiusproxy

Base: mainHead: unity-pt2


📝 Commits (1)

📊 Changes

15 files changed (+311 additions, -28 deletions)

View changed files

📝 CMakeLists.txt (+4 -1)
📝 src/common/ntapi.cpp (+0 -2)
📝 src/common/ntapi.h (+3 -6)
📝 src/common/thread.cpp (+13 -1)
📝 src/common/thread.h (+2 -0)
📝 src/core/devices/logger.cpp (+1 -0)
src/core/libraries/kernel/sync/mutex.cpp (+52 -0)
src/core/libraries/kernel/sync/mutex.h (+80 -0)
src/core/libraries/kernel/sync/semaphore.h (+117 -0)
📝 src/core/libraries/kernel/threads/condvar.cpp (+2 -2)
📝 src/core/libraries/kernel/threads/event_flag.cpp (+0 -1)
📝 src/core/libraries/kernel/threads/pthread.cpp (+1 -0)
📝 src/core/libraries/kernel/threads/pthread.h (+5 -3)
📝 src/core/libraries/kernel/threads/semaphore.cpp (+15 -11)
📝 src/core/libraries/kernel/time.cpp (+16 -1)

📄 Description

A big roadblock for Unity on Windows is the use of exceptions, and to implement those, we need to do some preparations.
The idea is to use APCs—for this, we must switch our code to use alertable waits with Win32 wrappers on:

  • Pthread condition waits
  • Pthread mutexes
  • Orbis and POSIX semaphores
  • Thread sleeps
  • Event flags (was not seen on Unity, thus not a priority)

This will allow us to properly implement exceptions later on.


🔄 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/1671 **Author:** [@polybiusproxy](https://github.com/polybiusproxy) **Created:** 12/5/2024 **Status:** ✅ Merged **Merged:** 12/6/2024 **Merged by:** [@polybiusproxy](https://github.com/polybiusproxy) **Base:** `main` ← **Head:** `unity-pt2` --- ### 📝 Commits (1) - [`ae55e18`](https://github.com/shadps4-emu/shadPS4/commit/ae55e1849876a7dd663579523f9c4a4397928bae) The way to Unity, pt.2 ### 📊 Changes **15 files changed** (+311 additions, -28 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+4 -1) 📝 `src/common/ntapi.cpp` (+0 -2) 📝 `src/common/ntapi.h` (+3 -6) 📝 `src/common/thread.cpp` (+13 -1) 📝 `src/common/thread.h` (+2 -0) 📝 `src/core/devices/logger.cpp` (+1 -0) ➕ `src/core/libraries/kernel/sync/mutex.cpp` (+52 -0) ➕ `src/core/libraries/kernel/sync/mutex.h` (+80 -0) ➕ `src/core/libraries/kernel/sync/semaphore.h` (+117 -0) 📝 `src/core/libraries/kernel/threads/condvar.cpp` (+2 -2) 📝 `src/core/libraries/kernel/threads/event_flag.cpp` (+0 -1) 📝 `src/core/libraries/kernel/threads/pthread.cpp` (+1 -0) 📝 `src/core/libraries/kernel/threads/pthread.h` (+5 -3) 📝 `src/core/libraries/kernel/threads/semaphore.cpp` (+15 -11) 📝 `src/core/libraries/kernel/time.cpp` (+16 -1) </details> ### 📄 Description A big roadblock for Unity on Windows is the use of exceptions, and to implement those, we need to do some preparations. The idea is to use APCs—for this, we must switch our code to use alertable waits with Win32 wrappers on: - [x] Pthread condition waits - [x] Pthread mutexes - [x] Orbis and POSIX semaphores - [x] Thread sleeps - [ ] Event flags (was not seen on Unity, thus not a priority) This will allow us to properly implement exceptions later on. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 21:15:42 +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#2236
No description provided.