xref: /DragonOS/kernel/src/process/pid.rs (revision 196b75dc17b5cc2ed84301bce776e496ddfe1ed1)
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 }
19