xref: /DragonOS/kernel/src/process/pid.rs (revision 728aca308917a7d4d0ba10fe8174e9408d77a9a6)
1 #[allow(dead_code)]
2 #[derive(Debug, Clone, Copy)]
3 #[repr(u8)]
4 pub enum PidType {
5     /// pid类型是进程id
6     PID = 1,
7     TGID = 2,
8     PGID = 3,
9     SID = 4,
10     MAX = 5,
11 }
12 
13 /// 为PidType实现判断相等的trait
14 impl PartialEq for PidType {
15     fn eq(&self, other: &PidType) -> bool {
16         *self as u8 == *other as u8
17     }
18 }