mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
kernel: allow connection IDs to be u32
In an effort to homogonize platforms, we are moving away from `usize` in favour of `u32`. Allow the `CID` type to be a `u32` in the kernel by casting it to a `usize` as necessary. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
00ef495b09
commit
715e76bee0
1 changed files with 2 additions and 2 deletions
|
|
@ -1497,7 +1497,7 @@ impl SystemServices {
|
|||
|
||||
ArchProcess::with_inner(|process_inner| {
|
||||
assert_eq!(crate::arch::process::current_pid(), process_inner.pid);
|
||||
if cid >= process_inner.connection_map.len() {
|
||||
if (cid as usize) >= process_inner.connection_map.len() {
|
||||
// println!("KERNEL({}): CID {} > connection map len", crate::arch::process::current_pid(), cid);
|
||||
return None;
|
||||
}
|
||||
|
|
@ -1505,7 +1505,7 @@ impl SystemServices {
|
|||
// println!("KERNEL({}): CID {} doesn't exist in the connection map", crate::arch::process::current_pid(), cid + 2);
|
||||
// println!("KERNEL({}): Process inner is: {:?}", crate::arch::process::current_pid(), process_inner);
|
||||
// }
|
||||
let mut server_idx = process_inner.connection_map[cid]?.get() as usize;
|
||||
let mut server_idx = process_inner.connection_map[cid as usize]?.get() as usize;
|
||||
if server_idx == 1 {
|
||||
// println!("KERNEL({}): CID {} is no longer valid", crate::arch::process::current_pid(), cid + 2);
|
||||
return None;
|
||||
|
|
|
|||
Loading…
Reference in a new issue