diff options
author | Alexis211 <alexis211@gmail.com> | 2009-10-11 18:38:05 +0200 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-10-11 18:38:05 +0200 |
commit | 3be1804db57e5d1ff08f46c7b7418729da631c26 (patch) | |
tree | e91e0197b3009080647f448542ff2a16c00946cb /Source/Kernel/Devices | |
parent | 244df8bd2c52db9d9c9b59b917206dafcd275ebe (diff) | |
download | Melon-3be1804db57e5d1ff08f46c7b7418729da631c26.tar.gz Melon-3be1804db57e5d1ff08f46c7b7418729da631c26.zip |
Tasking now works with linked lists
Diffstat (limited to 'Source/Kernel/Devices')
-rw-r--r-- | Source/Kernel/Devices/Floppy/FloppyController.class.cpp | 8 | ||||
-rw-r--r-- | Source/Kernel/Devices/Floppy/FloppyDrive.class.cpp | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/Source/Kernel/Devices/Floppy/FloppyController.class.cpp b/Source/Kernel/Devices/Floppy/FloppyController.class.cpp index fa7a56a..146ce28 100644 --- a/Source/Kernel/Devices/Floppy/FloppyController.class.cpp +++ b/Source/Kernel/Devices/Floppy/FloppyController.class.cpp @@ -75,7 +75,7 @@ void FloppyController::dmaRelease() { //********************************************************* u32int floppyMotorTimer(void* plop) { //This will be an independant thread while(1) { - Task::currentThread->sleep(1000); //Check only every second + Task::currThread()->sleep(1000); //Check only every second Vector<Device*> floppys = Dev::findDevices("block.floppy"); for (u32int i = 0; i < floppys.size(); i++) { FloppyDrive* f = (FloppyDrive*)floppys[i]; @@ -147,7 +147,7 @@ void FloppyController::setDOR() { asm volatile ("cli"); outb(m_base + FR_DOR, dor); if (m_first) { //First time we set the DOR, controller initialized - Task::currentThread->waitIRQ(m_irq); + Task::currThread()->waitIRQ(m_irq); int st0, cyl; checkInterrupt(&st0, &cyl); m_first = false; @@ -172,7 +172,7 @@ bool FloppyController::writeCmd(u8int cmd) { outb(m_base + FR_FIFO, cmd); return true; } - Task::currentThread->sleep(10); + Task::currThread()->sleep(10); } return false; } @@ -182,7 +182,7 @@ u8int FloppyController::readData() { if (0x80 & inb(m_base + FR_MSR)) { return inb(m_base + FR_FIFO); } - Task::currentThread->sleep(10); + Task::currThread()->sleep(10); } return 0; } diff --git a/Source/Kernel/Devices/Floppy/FloppyDrive.class.cpp b/Source/Kernel/Devices/Floppy/FloppyDrive.class.cpp index beaaf19..7edf24a 100644 --- a/Source/Kernel/Devices/Floppy/FloppyDrive.class.cpp +++ b/Source/Kernel/Devices/Floppy/FloppyDrive.class.cpp @@ -98,7 +98,7 @@ bool FloppyDrive::calibrate() { m_fdc->writeCmd(FC_RECALIBRATE); m_fdc->writeCmd(m_driveNumber); - Task::currentThread->waitIRQ(m_fdc->m_irq); + Task::currThread()->waitIRQ(m_fdc->m_irq); m_fdc->checkInterrupt(&st0, &cyl); asm volatile("sti"); @@ -121,7 +121,7 @@ bool FloppyDrive::setMotorState(bool on) { if (m_motorState == FS_MOTOROFF) { m_motorState = FS_MOTORON; m_fdc->setDOR(); - Task::currentThread->sleep(500); + Task::currThread()->sleep(500); } m_motorState = FS_MOTORON; } else { @@ -151,7 +151,7 @@ bool FloppyDrive::seek(u32int cyli, s32int head) { m_fdc->writeCmd(head << 2); m_fdc->writeCmd(cyl); - Task::currentThread->waitIRQ(m_fdc->m_irq); + Task::currThread()->waitIRQ(m_fdc->m_irq); m_fdc->checkInterrupt(&st0, &cyl); asm volatile("sti"); @@ -201,7 +201,7 @@ bool FloppyDrive::doTrack(u32int cyl, u8int dir) { return false; } - Task::currentThread->sleep(100); + Task::currThread()->sleep(100); asm volatile("cli"); m_fdc->writeCmd(cmd); @@ -214,7 +214,7 @@ bool FloppyDrive::doTrack(u32int cyl, u8int dir) { m_fdc->writeCmd(0x1B); m_fdc->writeCmd(0xFF); - Task::currentThread->waitIRQ(m_fdc->m_irq); + Task::currThread()->waitIRQ(m_fdc->m_irq); u8int st0, st1, st2, rcy, rhe, rse, bps; st0 = m_fdc->readData(); @@ -277,7 +277,7 @@ bool FloppyDrive::readOnly() { asm volatile("cli"); m_fdc->writeCmd(FC_SENSE_DRIVE_STATUS); m_fdc->writeCmd(m_driveNumber); - Task::currentThread->waitIRQ(m_fdc->m_irq); + Task::currThread()->waitIRQ(m_fdc->m_irq); u8int st3 = m_fdc->readData(); asm volatile("sti"); |