MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / FindCmdSlot

Method FindCmdSlot

Kernel/src/storage/ahciport.cpp:522–533  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

520 }
521
522 int Port::FindCmdSlot(){
523 // If not set in SACT and CI, the slot is free
524 uint32_t slots = (registers->sact | registers->ci);
525 for (int i=0; i<8; i++)
526 {
527 if ((slots&1) == 0)
528 return i;
529 slots >>= 1;
530 }
531
532 return -1;
533 }
534}
535
536

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected