Lines Matching refs:guard
290 let mut guard = self.inner.lock(); in process_packet() localVariable
291 guard.buf.push(packet); // 更新缓冲区 in process_packet()
292 match guard.current_packet { in process_packet()
298 guard.current_state.flags = flags; in process_packet()
301 let flags = guard.current_state.flags; in process_packet()
303 guard.current_state.x = self.get_x_movement(packet, flags); in process_packet()
307 let flags = guard.current_state.flags; in process_packet()
309 guard.current_state.y = self.get_y_movement(packet, flags); in process_packet()
321 guard.current_packet = (guard.current_packet + 1) % 3; in process_packet()
473 let mut guard = self.inner(); in class() localVariable
474 let r = guard.device_common.class.clone()?.upgrade(); in class()
476 guard.device_common.class = None; in class()
597 let mut guard = self.inner.lock_irqsave(); in open() localVariable
598 guard.buf.clear(); in open()
603 let mut guard = self.inner.lock_irqsave(); in close() localVariable
604 guard.buf.clear(); in close()
615 let mut guard = self.inner.lock_irqsave(); in read_at() localVariable
617 if guard.buf.len() >= 3 { in read_at()
619 *item = guard.buf.dequeue().unwrap(); in read_at()