Home
last modified time | relevance | path

Searched refs:state (Results 1 – 25 of 38) sorted by relevance

12

/DragonOS-0.1.8/kernel/src/libs/
Dwait_queue.rs46 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 …]
Dwait_queue.c28 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()
Dwait_queue_head.c26 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()
Dsemaphore.c16 current_pcb->state = PROC_UNINTERRUPTIBLE; in semaphore_down()
Dmutex.rs107 current_pcb().state &= !(PROC_RUNNING as u64); in __sleep()
108 current_pcb().state |= PROC_INTERRUPTIBLE as u64; in __sleep()
Dmutex.c19 current_pcb->state = PROC_UNINTERRUPTIBLE; in __mutex_sleep()
/DragonOS-0.1.8/docs/kernel/sched/
Drust_waiting.md44 // 唤醒等待队列头部的进程(如果它的state & PROC_INTERRUPTIBLE 不为0)
47 // 唤醒等待队列头部的进程(如果它的state & PROC_UNINTERRUPTIBLE 不为0)
50 // 唤醒等待队列头部的进程(无论它的state是什么)
71   您可以使用`wakeup(state)`函数,唤醒等待队列中的第一个进程。如果这个进程的state与给定的state进行and操作之后,结果不为0,则唤醒它。
Dc_waiting.md67 …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)`来唤醒队列里面的队列头节点。
Drt.md10    RTQueue是用来存放state为running的实时进程的调度队列,每个CPU维护一个RTQueue,主要使用Vec作为主要存储结构来实现。
/DragonOS-0.1.8/kernel/src/exception/
Dtrap.c18 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.8/kernel/src/process/
Dc_adapter.rs86 let state = current_pcb().fp_state as usize as *mut FpState; in rs_dup_fpstate() localVariable
88 let s = state.as_ref().unwrap(); in rs_dup_fpstate()
89 let state: &mut FpState = Box::leak(Box::new(s.clone())); in rs_dup_fpstate() localVariable
91 return state as *mut FpState as usize as *mut c_void; in rs_dup_fpstate()
100 let state = pcb.fp_state as usize as *mut FpState; in rs_process_exit_fpstate() localVariable
102 drop(Box::from_raw(state)); in rs_process_exit_fpstate()
Dprocess.rs32 let state: u64 = unsafe { read_volatile(&(*pcb).state) } as u64; in process_is_stopped() localVariable
33 if (state & (PROC_STOPPED as u64)) != 0 { in process_is_stopped()
63 write_volatile(&mut pcb.state, PROC_RUNNING as u64); in process_try_to_wake_up()
72 if unsafe { read_volatile(&pcb.state) } & _state != 0 { in process_try_to_wake_up()
75 write_volatile(&mut pcb.state, PROC_RUNNING as u64); in process_try_to_wake_up()
91 pub extern "C" fn process_wake_up_state(pcb: *mut process_control_block, state: u64) -> bool { in process_wake_up_state()
92 return process_try_to_wake_up(pcb, state, 0); in process_wake_up_state()
287 self.state = PROC_INTERRUPTIBLE as u64; in mark_sleep_interruptible()
296 self.state = PROC_UNINTERRUPTIBLE as u64; in mark_sleep_uninterruptible()
Dprocess.c57 ….state = PROC_UNINTERRUPTIBLE, .flags = PF_KTHREAD, .preempt_count = 0, .signal = 0, .cpu_id = 0, …
257 pcb->state = PROC_ZOMBIE; in process_do_exit()
351 initial_proc_union.pcb.state = PROC_RUNNING; in process_init()
395 if (pcb->state & PROC_RUNNING) in process_wakeup()
398 pcb->state |= PROC_RUNNING; in process_wakeup()
410 if (pcb->state & PROC_RUNNING) in process_wakeup_immediately()
Dkthread.c172 current_pcb->state = PROC_UNINTERRUPTIBLE; in kthread()
177 current_pcb->state &= ~PROC_RUNNING; // 设置当前进程不是RUNNING态 in kthread()
224 current_pcb->state = PROC_INTERRUPTIBLE; in kthreadd()
Dproc-types.h81 volatile uint64_t state; member
Dprocess.h212 extern int process_wake_up_state(struct process_control_block *pcb, uint64_t state);
/DragonOS-0.1.8/kernel/src/driver/base/platform/
Dmod.rs293 let state = self.0.lock().state; in is_initialized() localVariable
294 match state { in is_initialized()
305 let state = &mut self.0.lock().state; in set_state() localVariable
306 *state = set_state; in set_state()
315 let state = self.0.lock().state; in get_state() localVariable
316 return state; in get_state()
332 state: BusState, // 总线状态 field
344 state: BusState::NotInitialized, in new()
/DragonOS-0.1.8/kernel/src/driver/base/device/
Dbus.rs34 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()
Dmod.rs149 fn from(state: u32) -> Self { in from()
150 match state { in from()
160 fn from(state: DeviceState) -> Self { in from()
161 match state { in from()
/DragonOS-0.1.8/kernel/src/driver/tty/
Dmod.rs60 state: RwLock<TtyCoreState>, field
86 let state: RwLock<TtyCoreState> = RwLock::new(TtyCoreState { bits: 0 }); in new() localVariable
93 state, in new()
292 self.state.write().set(TtyCoreState::ECHO_ON, true); in enable_echo()
299 self.state.write().set(TtyCoreState::ECHO_ON, false); in disable_echo()
310 return self.state.read().contains(TtyCoreState::ECHO_ON); in echo_enabled()
/DragonOS-0.1.8/kernel/src/common/
Dlz4.h198 …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);
Dwait_queue.h52 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.8/kernel/src/driver/uart/
Duart.rs103 state: DeviceState, // 设备状态 field
111 state: DeviceState::NotInitialized, in default()
136 let state = self.0.lock().state; in is_initialized() localVariable
137 match state { in is_initialized()
144 let state = &mut self.0.lock().state; in set_state() localVariable
145 *state = set_state; in set_state()
/DragonOS-0.1.8/kernel/src/sched/
Dcompletion.c57 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()
/DragonOS-0.1.8/kernel/src/syscall/
Dsyscall.c107 while (child_proc->state != PROC_ZOMBIE) in c_sys_wait4()

12