Lines Matching refs:offset
37 pub fn get_addr(&self, offset: isize) -> *mut u32 { in get_addr()
38 return unsafe { self.addr.offset(offset) }; in get_addr()
41 pub fn get_val(&self, offset: isize) -> u32 { in get_val()
42 return unsafe { self.addr.offset(offset).read() }; in get_val()
45 pub fn set_val(&self, val: u32, offset: isize) { in set_val()
47 self.addr.offset(offset).write(val); in set_val()
65 pub fn get_val(&self, offset: isize) -> i32 { in get_val()
66 return unsafe { self.addr.offset(offset).read() }; in get_val()
69 pub fn set_val(&self, val: i32, offset: isize) { in set_val()
71 self.addr.offset(offset).write(val); in set_val()
256 futexes.offset(11).write(0x0000_0000); in test01()
257 futexes.offset(12).write(0x8000_0000); in test01()
258 println!("futex1 next addr: {:?}", futexes.offset(0)); in test01()
259 println!("futex2 next addr: {:?}", futexes.offset(1)); in test01()
260 println!("futex1 val addr: {:?}", futexes.offset(11)); in test01()
261 println!("futex2 val addr: {:?}", futexes.offset(12)); in test01()
262 println!("futex1 val: {:#x?}", futexes.offset(11).read()); in test01()
263 println!("futex2 val: {:#x?}", futexes.offset(12).read()); in test01()
271 head_ref_mut.list.next = futexes.offset(0) as *const RobustList; in test01()
274 list_2_ref_mut.next = futexes.offset(1) as *const RobustList; in test01()
302 println!("futex1 val: {:#x}", futexes.offset(11).read()); in test01()
303 println!("futex2 val: {:#x}", futexes.offset(12).read()); in test01()
304 println!("robust list next: {:?}", futexes.offset(0)); in test01()
305 println!("robust list next next: {:#x?}", futexes.offset(0).read()); in test01()
342 futexes.offset(11).write(0x0000_0000); in test02()
343 futexes.offset(12).write(0x0000_0000); in test02()
344 println!("futex1 next addr: {:?}", futexes.offset(0)); in test02()
345 println!("futex2 next addr: {:?}", futexes.offset(1)); in test02()
346 println!("futex1 val addr: {:?}", futexes.offset(11)); in test02()
347 println!("futex2 val addr: {:?}", futexes.offset(12)); in test02()
348 println!("futex1 val: {:#x?}", futexes.offset(11).read()); in test02()
349 println!("futex2 val: {:#x?}", futexes.offset(12).read()); in test02()
351 count.offset(0).write(1); in test02()
352 count.offset(1).write(0); in test02()
353 println!("count1 val: {:?}", count.offset(0).read()); in test02()
354 println!("count2 val: {:?}", count.offset(1).read()); in test02()