1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-08 13:11:49 +00:00

pgl: fix minor bugs in impl

This commit is contained in:
Michael Scire 2020-04-16 10:09:53 -07:00
parent db55e9f6b1
commit 2421ba6c96
3 changed files with 11 additions and 4 deletions

View file

@ -44,7 +44,7 @@ namespace ams::diag {
inline void DebugLog(const char *format, ...) __attribute__((format(printf, 1, 2)));
#ifdef AMS_ENABLE_DEBUG_PRINT
os::Mutex g_debug_log_lock;
os::Mutex g_debug_log_lock(true);
char g_debug_buffer[0x400];
void DebugLogImpl(const char *format, ::std::va_list vl) {

View file

@ -169,7 +169,7 @@ namespace ams::fssystem {
if (this->size > ideal_size) {
/* If we do, we need to have a buffer allocated from the heap. */
AMS_ASSERT(this->buffer != nullptr);
AMS_ASSERT(g_heap.GetBlockSize(), HeapBlockSize);
AMS_ASSERT(g_heap.GetBlockSize() == HeapBlockSize);
const size_t new_size = util::AlignUp(ideal_size, HeapBlockSize);

View file

@ -42,7 +42,7 @@ namespace ams::pgl::srv {
bool g_enable_crash_report_screenshot = true;
bool g_enable_jit_debug = false;
constexpr inline size_t ProcessControlTaskStackSize = 4_KB;
constexpr inline size_t ProcessControlTaskStackSize = 8_KB;
constexpr inline s32 ProcessControlTaskPriority = 21;
os::ThreadType g_process_control_task_thread;
alignas(os::ThreadStackAlignment) u8 g_process_control_task_stack[ProcessControlTaskStackSize];
@ -290,7 +290,7 @@ namespace ams::pgl::srv {
while (true) {
/* Wait for an event to come in, and clear our signal. */
process_event.Wait();
process_event.Signal();
process_event.Clear();
bool continue_getting_event = true;
while (continue_getting_event) {
@ -329,6 +329,13 @@ namespace ams::pgl::srv {
settings::fwdbg::GetSettingsItemValue(std::addressof(g_enable_crash_report_screenshot), sizeof(g_enable_crash_report_screenshot), "creport", "crash_screen_shot");
g_is_production = !settings::fwdbg::IsDebugModeEnabled();
/* Clear all process data. */
{
for (size_t i = 0; i < util::size(g_process_data); i++) {
g_process_data[i].process_id = os::InvalidProcessId;
}
}
/* Start the thread. */
os::StartThread(std::addressof(g_process_control_task_thread));
}