diff --git a/src/xenia/kernel/xboxkrnl_io.cc b/src/xenia/kernel/xboxkrnl_io.cc index 56794a523..7f91478c3 100644 --- a/src/xenia/kernel/xboxkrnl_io.cc +++ b/src/xenia/kernel/xboxkrnl_io.cc @@ -328,6 +328,17 @@ SHIM_CALL NtQueryInformationFile_shim( file_info.Write(SHIM_MEM_BASE, file_info_ptr); } break; + case XFileMailslotSetInformation: + // Read timeout. + if (length == 4) { + info = 4; // ? it's not a read. + uint32_t read_timeout = SHIM_MEM_32(file_info_ptr); + // May be INFINITE. + // Do something with this? + } else { + result = X_STATUS_INFO_LENGTH_MISMATCH; + } + break; default: // Unsupported, for now. XEASSERTALWAYS(); diff --git a/src/xenia/kernel/xboxkrnl_threading.cc b/src/xenia/kernel/xboxkrnl_threading.cc index fbc933e82..ed04f79ee 100644 --- a/src/xenia/kernel/xboxkrnl_threading.cc +++ b/src/xenia/kernel/xboxkrnl_threading.cc @@ -928,7 +928,7 @@ SHIM_CALL NtReleaseMutant_shim( bool wait = false; XELOGD( - "NtReleaseMutant(%.8X, %8.X)", + "NtReleaseMutant(%.8X, %.8X)", mutant_handle, unknown); X_STATUS result = X_STATUS_SUCCESS; diff --git a/src/xenia/xbox.h b/src/xenia/xbox.h index 2f164adb7..fa622ebb8 100644 --- a/src/xenia/xbox.h +++ b/src/xenia/xbox.h @@ -27,29 +27,30 @@ typedef uint32_t X_HANDLE; typedef uint32_t X_STATUS; #define XSUCCEEDED(s) ((s & 0xC0000000) == 0) #define XFAILED(s) (!XSUCCEEDED(s)) -#define X_STATUS_SUCCESS ((uint32_t)0x00000000L) -#define X_STATUS_ABANDONED_WAIT_0 ((uint32_t)0x00000080L) -#define X_STATUS_USER_APC ((uint32_t)0x000000C0L) -#define X_STATUS_ALERTED ((uint32_t)0x00000101L) -#define X_STATUS_TIMEOUT ((uint32_t)0x00000102L) -#define X_STATUS_PENDING ((uint32_t)0x00000103L) -#define X_STATUS_UNSUCCESSFUL ((uint32_t)0xC0000001L) -#define X_STATUS_NOT_IMPLEMENTED ((uint32_t)0xC0000002L) -#define X_STATUS_ACCESS_VIOLATION ((uint32_t)0xC0000005L) -#define X_STATUS_INVALID_HANDLE ((uint32_t)0xC0000008L) -#define X_STATUS_INVALID_PARAMETER ((uint32_t)0xC000000DL) -#define X_STATUS_NO_SUCH_FILE ((uint32_t)0xC000000FL) -#define X_STATUS_NO_MEMORY ((uint32_t)0xC0000017L) -#define X_STATUS_ALREADY_COMMITTED ((uint32_t)0xC0000021L) -#define X_STATUS_ACCESS_DENIED ((uint32_t)0xC0000022L) -#define X_STATUS_BUFFER_TOO_SMALL ((uint32_t)0xC0000023L) -#define X_STATUS_OBJECT_TYPE_MISMATCH ((uint32_t)0xC0000024L) -#define X_STATUS_INVALID_PAGE_PROTECTION ((uint32_t)0xC0000045L) -#define X_STATUS_MUTANT_NOT_OWNED ((uint32_t)0xC0000046L) -#define X_STATUS_MEMORY_NOT_ALLOCATED ((uint32_t)0xC00000A0L) -#define X_STATUS_INVALID_PARAMETER_1 ((uint32_t)0xC00000EFL) -#define X_STATUS_INVALID_PARAMETER_2 ((uint32_t)0xC00000F0L) -#define X_STATUS_INVALID_PARAMETER_3 ((uint32_t)0xC00000F1L) +#define X_STATUS_SUCCESS ((X_STATUS)0x00000000L) +#define X_STATUS_ABANDONED_WAIT_0 ((X_STATUS)0x00000080L) +#define X_STATUS_USER_APC ((X_STATUS)0x000000C0L) +#define X_STATUS_ALERTED ((X_STATUS)0x00000101L) +#define X_STATUS_TIMEOUT ((X_STATUS)0x00000102L) +#define X_STATUS_PENDING ((X_STATUS)0x00000103L) +#define X_STATUS_UNSUCCESSFUL ((X_STATUS)0xC0000001L) +#define X_STATUS_NOT_IMPLEMENTED ((X_STATUS)0xC0000002L) +#define X_STATUS_INFO_LENGTH_MISMATCH ((X_STATUS)0xC0000004L) +#define X_STATUS_ACCESS_VIOLATION ((X_STATUS)0xC0000005L) +#define X_STATUS_INVALID_HANDLE ((X_STATUS)0xC0000008L) +#define X_STATUS_INVALID_PARAMETER ((X_STATUS)0xC000000DL) +#define X_STATUS_NO_SUCH_FILE ((X_STATUS)0xC000000FL) +#define X_STATUS_NO_MEMORY ((X_STATUS)0xC0000017L) +#define X_STATUS_ALREADY_COMMITTED ((X_STATUS)0xC0000021L) +#define X_STATUS_ACCESS_DENIED ((X_STATUS)0xC0000022L) +#define X_STATUS_BUFFER_TOO_SMALL ((X_STATUS)0xC0000023L) +#define X_STATUS_OBJECT_TYPE_MISMATCH ((X_STATUS)0xC0000024L) +#define X_STATUS_INVALID_PAGE_PROTECTION ((X_STATUS)0xC0000045L) +#define X_STATUS_MUTANT_NOT_OWNED ((X_STATUS)0xC0000046L) +#define X_STATUS_MEMORY_NOT_ALLOCATED ((X_STATUS)0xC00000A0L) +#define X_STATUS_INVALID_PARAMETER_1 ((X_STATUS)0xC00000EFL) +#define X_STATUS_INVALID_PARAMETER_2 ((X_STATUS)0xC00000F0L) +#define X_STATUS_INVALID_PARAMETER_3 ((X_STATUS)0xC00000F1L) // HRESULT (ERROR_*) // Adding as needed.