/DragonOS-0.1.7/kernel/src/libs/ |
D | wait_queue.rs | 46 current_pcb().state = PROC_INTERRUPTIBLE as u64; in sleep() 59 current_pcb().state = PROC_INTERRUPTIBLE as u64; in sleep_with_func() 84 current_pcb().state = PROC_INTERRUPTIBLE as u64; in sleep_without_schedule() 91 current_pcb().state = PROC_UNINTERRUPTIBLE as u64; in sleep_uninterruptible() 101 current_pcb().state = PROC_INTERRUPTIBLE as u64; in sleep_unlock_spinlock() 112 current_pcb().state = PROC_INTERRUPTIBLE as u64; in sleep_unlock_mutex() 123 current_pcb().state = PROC_UNINTERRUPTIBLE as u64; in sleep_uninterruptible_unlock_spinlock() 134 current_pcb().state = PROC_UNINTERRUPTIBLE as u64; in sleep_uninterruptible_unlock_mutex() 148 pub fn wakeup(&self, state: u64) -> bool { in wakeup() 156 if (guard.wait_list.front().unwrap().state & state) != 0 { in wakeup() [all …]
|
D | wait_queue.c | 28 current_pcb->state = PROC_UNINTERRUPTIBLE; in wait_queue_sleep_on() 44 current_pcb->state = PROC_UNINTERRUPTIBLE; in wait_queue_sleep_on_unlock() 59 current_pcb->state = PROC_INTERRUPTIBLE; in wait_queue_sleep_on_interriptible() 71 void wait_queue_wakeup(wait_queue_node_t *wait_queue_head, int64_t state) in wait_queue_wakeup() argument 78 if (wait->pcb->state & state) in wait_queue_wakeup()
|
D | wait_queue_head.c | 26 wait->pcb->state = PROC_UNINTERRUPTIBLE; in wait_queue_sleep_with_node() 41 wait->pcb->state = PROC_UNINTERRUPTIBLE; in wait_queue_sleep_with_node_unlock() 57 wait->pcb->state = PROC_INTERRUPTIBLE; in wait_queue_sleep_with_node_interriptible() 69 void wait_queue_wakeup_on_stack(wait_queue_head_t *q, int64_t state) in wait_queue_wakeup_on_stack() argument 77 if (wait->pcb->state & state) in wait_queue_wakeup_on_stack()
|
D | semaphore.c | 16 current_pcb->state = PROC_UNINTERRUPTIBLE; in semaphore_down()
|
D | mutex.rs | 107 current_pcb().state &= !(PROC_RUNNING as u64); in __sleep() 108 current_pcb().state |= PROC_INTERRUPTIBLE as u64; in __sleep()
|
D | mutex.c | 19 current_pcb->state = PROC_UNINTERRUPTIBLE; in __mutex_sleep()
|
D | rwlock.rs | 152 let state = self.lock.load(Ordering::Relaxed); in reader_count() localVariable 153 return state / READER + (state & UPGRADED) / UPGRADED; in reader_count()
|
/DragonOS-0.1.7/docs/kernel/sched/ |
D | rust_waiting.md | 44 // 唤醒等待队列头部的进程(如果它的state & PROC_INTERRUPTIBLE 不为0) 47 // 唤醒等待队列头部的进程(如果它的state & PROC_UNINTERRUPTIBLE 不为0) 50 // 唤醒等待队列头部的进程(无论它的state是什么) 71   您可以使用`wakeup(state)`函数,唤醒等待队列中的第一个进程。如果这个进程的state与给定的state进行and操作之后,结果不为0,则唤醒它。
|
D | c_waiting.md | 67 …ue_wakeup(wait_queue_node_t * wait_queue_head, int64_t state);`函数,从指定的等待队列中,唤醒第一个挂起时的状态与指定的`state`… 127 …于在栈上的wait_node,您可以选择`wait_queue_wakeup_on_stack(wait_queue_head_t *q, int64_t state)`来唤醒队列里面的队列头节点。
|
D | rt.md | 10    RTQueue是用来存放state为running的实时进程的调度队列,每个CPU维护一个RTQueue,主要使用Vec作为主要存储结构来实现。
|
/DragonOS-0.1.7/kernel/src/exception/ |
D | trap.c | 18 current_pcb->state = PROC_STOPPED; in do_divide_error() 69 current_pcb->state = PROC_STOPPED; in do_overflow() 91 current_pcb->state = PROC_STOPPED; in do_undefined_opcode() 102 current_pcb->state = PROC_STOPPED; in do_dev_not_avaliable() 115 current_pcb->state = PROC_STOPPED; in do_double_fault() 126 current_pcb->state = PROC_STOPPED; in do_coprocessor_segment_overrun() 158 current_pcb->state = PROC_STOPPED; in do_invalid_TSS() 169 current_pcb->state = PROC_STOPPED; in do_segment_not_exists() 181 current_pcb->state = PROC_STOPPED; in do_stack_segment_fault() 209 current_pcb->state = PROC_STOPPED; in do_general_protection() [all …]
|
/DragonOS-0.1.7/kernel/src/process/ |
D | process.rs | 30 let state: u64 = unsafe { read_volatile(&(*pcb).state) } as u64; in process_is_stopped() localVariable 31 if (state & (PROC_STOPPED as u64)) != 0 { in process_is_stopped() 61 write_volatile(&mut pcb.state, PROC_RUNNING as u64); in process_try_to_wake_up() 70 if unsafe { read_volatile(&pcb.state) } & _state != 0 { in process_try_to_wake_up() 73 write_volatile(&mut pcb.state, PROC_RUNNING as u64); in process_try_to_wake_up() 89 pub extern "C" fn process_wake_up_state(pcb: *mut process_control_block, state: u64) -> bool { in process_wake_up_state() 90 return process_try_to_wake_up(pcb, state, 0); in process_wake_up_state() 285 self.state = PROC_INTERRUPTIBLE as u64; in mark_sleep_interruptible() 294 self.state = PROC_UNINTERRUPTIBLE as u64; in mark_sleep_uninterruptible() 371 let state = current_pcb().fp_state as usize as *mut FpState; in rs_dup_fpstate() localVariable [all …]
|
D | kthread.c | 172 current_pcb->state = PROC_UNINTERRUPTIBLE; in kthread() 177 current_pcb->state &= ~PROC_RUNNING; // 设置当前进程不是RUNNING态 in kthread() 224 current_pcb->state = PROC_INTERRUPTIBLE; in kthreadd()
|
D | proc-types.h | 81 volatile uint64_t state; member
|
D | process.c | 56 ….state = PROC_UNINTERRUPTIBLE, .flags = PF_KTHREAD, .preempt_count = 0, .signal = 0, .cpu_id = 0, … 656 pcb->state = PROC_ZOMBIE; in process_do_exit() 739 initial_proc_union.pcb.state = PROC_RUNNING; in process_init() 782 if (pcb->state & PROC_RUNNING) in process_wakeup() 785 pcb->state |= PROC_RUNNING; in process_wakeup() 797 if (pcb->state & PROC_RUNNING) in process_wakeup_immediately()
|
D | process.h | 222 extern int process_wake_up_state(struct process_control_block *pcb, uint64_t state);
|
/DragonOS-0.1.7/kernel/src/driver/base/platform/ |
D | mod.rs | 291 let state = self.0.lock().state; in is_initialized() localVariable 292 match state { in is_initialized() 303 let state = &mut self.0.lock().state; in set_state() localVariable 304 *state = set_state; in set_state() 313 let state = self.0.lock().state; in get_state() localVariable 314 return state; in get_state() 330 state: BusState, // 总线状态 field 342 state: BusState::NotInitialized, in new()
|
/DragonOS-0.1.7/kernel/src/driver/base/device/ |
D | bus.rs | 34 fn from(state: u32) -> Self { in from() 35 match state { in from() 45 fn from(state: DeviceState) -> Self { in from() 46 match state { in from() 56 fn from(state: BusState) -> Self { in from() 57 match state { in from()
|
D | mod.rs | 94 fn from(state: u32) -> Self { in from() 95 match state { in from() 105 fn from(state: DeviceState) -> Self { in from() 106 match state { in from()
|
/DragonOS-0.1.7/kernel/src/driver/tty/ |
D | mod.rs | 58 state: RwLock<TtyCoreState>, field 84 let state: RwLock<TtyCoreState> = RwLock::new(TtyCoreState { bits: 0 }); in new() localVariable 91 state, in new() 280 self.state.write().set(TtyCoreState::ECHO_ON, true); in enable_echo() 287 self.state.write().set(TtyCoreState::ECHO_ON, false); in disable_echo() 298 return self.state.read().contains(TtyCoreState::ECHO_ON); in echo_enabled()
|
/DragonOS-0.1.7/kernel/src/common/ |
D | lz4.h | 198 …LZ4LIB_API int LZ4_compress_fast_extState(void *state, const char *src, char *dst, int srcSize, in… 460 …LZ4LIB_STATIC_API int LZ4_compress_fast_extState_fastReset(void *state, const char *src, char *dst… 687 … LZ4LIB_API int LZ4_compress_withState(void *state, const char *source, char *dest, int inputSize); 689 …LZ4LIB_API int LZ4_compress_limitedOutput_withState(void *state, const char *source, char *dest, i… 716 LZ4LIB_API int LZ4_resetStreamState(void *state, char *inputBuffer); 718 LZ4LIB_API char *LZ4_slideInputBuffer(void *state);
|
D | wait_queue.h | 52 void wait_queue_wakeup(wait_queue_node_t *wait_queue_head, int64_t state); 118 void wait_queue_wakeup_on_stack(wait_queue_head_t *q, int64_t state);
|
/DragonOS-0.1.7/kernel/src/sched/ |
D | completion.c | 57 static long __wait_for_common(struct completion *x, long (*action)(long), long timeout, int state) in __wait_for_common() argument 68 wait.pcb->state = state; // 清除运行位, 并设置为interuptible/uninteruptible in __wait_for_common() 78 wait.pcb->state = PROC_RUNNING; // 设置为运行, 并清空state, 所以使用等号赋值 in __wait_for_common()
|
D | cfs.rs | 195 if (current_pcb().state & (PROC_RUNNING as u64)) == 0 in sched() 200 if current_pcb().state & (PROC_RUNNING as u64) != 0 { in sched()
|
/DragonOS-0.1.7/kernel/src/driver/usb/xhci/ |
D | internal.h | 85 #define xhci_ep_set_dequeue_cycle_state(ep_ctx_ptr, state) ((ep_ctx_ptr)->tr_dequeue_ptr |= ((state… argument
|