Skip to content

Commit

Permalink
Fixes incorrect process ID for game process (obhq#810)
Browse files Browse the repository at this point in the history
  • Loading branch information
ultimaweapon authored Apr 6, 2024
1 parent 71f433c commit e74514c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/gmtx/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ impl GutexGroup {

#[cfg(target_os = "linux")]
unsafe fn wake_one(addr: *mut i32) {
use libc::{syscall, SYS_futex, EAGAIN, FUTEX_PRIVATE_FLAG, FUTEX_WAKE};
use libc::{syscall, SYS_futex, FUTEX_PRIVATE_FLAG, FUTEX_WAKE};

if unsafe { syscall(SYS_futex, addr, FUTEX_WAKE | FUTEX_PRIVATE_FLAG, 1) } < 0 {
panic!("FUTEX_WAKE failed: {}", Error::last_os_error());
Expand Down
2 changes: 1 addition & 1 deletion src/kernel/src/process/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -903,5 +903,5 @@ pub enum VProcInitError {
#[derive(Debug, Error, Errno)]
pub enum CreateThreadError {}

static NEXT_ID: AtomicI32 = AtomicI32::new(1);
static NEXT_ID: AtomicI32 = AtomicI32::new(123);
const PID1: NonZeroI32 = unsafe { NonZeroI32::new_unchecked(1) };

0 comments on commit e74514c

Please sign in to comment.