ructpcb
extheadNULLbheadNULLptypedefstructpcbPCBPCBsortPCBp1p2i
ti
sert0ifheadNULLppriorityheadpriority空时直接插入头p
extheadheadpelse非空时比较优先级插入p1headp2head
extwhilep2NULLifppriorityp2priority若插入进程比当前进程优先数大插入到当前进程前面p
extp2p1
extpp2NULLi
sert1else插入进程优先数最低则插入到队尾p1p1
extp2p2
extifp2NULLp1
extpp
extNULLvoidi
puti
tiN
fsystem