SSUOS_P6/src/kernel/device/ata.c
/* Write sector SEC_NO to disk D from BUFFER, which must contain
   ATA_SECOR_SIZE bytes.  Returns after the disk has
   acknowledged receiving the data.
   Internally synchronizes accesses to disks, so external
   per-disk locking is unneeded. */
Write sector SEC_NO to disk D from BUFFER, which must contain
ATA_SECOR_SIZE bytes.  Returns after the disk has
acknowledged receiving the data.
Internally synchronizes accesses to disks, so external
per-disk locking is unneeded.
Write sector SEC_NO to disk D from BUFFER which must contain ATA_SECOR_SIZE bytes . Returns after the disk has acknowledged receiving the data . Internally synchronizes accesses to disks so external per - disk locking is unneeded .
static void
ata_write (void *dev, blk_sec_t sec_num, const void *buf)
{
	struct ata_device *d = dev;
	  ata_io_ready (d, sec_num);
	   ata_cmd (d, ATA_CMD_WRITE_PIO);
	   if (!delay_ata_for (d, ATA_WAIT_BUSY));
	   sector_write (d, buf);
	   sema_down (&d->sema);
}
static void ata_write ( void * dev , blk_sec_t sec_num , const void * buf ) { struct ata_device * d = dev ; ata_io_ready ( d , sec_num ) ; ata_cmd ( d , ATA_CMD_WRITE_PIO ) ; if ( ! delay_ata_for ( d , ATA_WAIT_BUSY ) ) ; sector_write ( d , buf ) ; sema_down ( & d -> sema ) ; }
Write sector SEC_NO to disk D from BUFFER, which must contain
ATA_SECOR_SIZE bytes.
Write sector SEC_NO to disk D from BUFFER which must contain ATA_SECOR_SIZE bytes .