kernel drivers: have timer hooks return B_HANDLED_INTERRUPT.

* 0 means B_UNHANDLED_INTERRUPT.
* uses int32 as return type.
This commit is contained in:
Jérôme Duval
2018-05-23 18:41:35 +02:00
parent 02a7351fa2
commit 177f5facbf
9 changed files with 14 additions and 14 deletions
@@ -79,7 +79,7 @@ static int32
generate_event(timer* timer) generate_event(timer* timer)
{ {
gEventProducer.InjectEvent(); gEventProducer.InjectEvent();
return 0; return B_HANDLED_INTERRUPT;
} }
@@ -79,7 +79,7 @@ static int32
generate_event(timer* timer) generate_event(timer* timer)
{ {
gEventProducer.InjectEvent(); gEventProducer.InjectEvent();
return 0; return B_HANDLED_INTERRUPT;
} }
@@ -26,11 +26,11 @@ Radeon_DisableIRQ(device_info *di)
* handles standard interrupts, i.e. VBI and DMA * handles standard interrupts, i.e. VBI and DMA
*/ */
static uint32 static int32
Radeon_ThreadInterruptWork(vuint8 *regs, device_info *di, uint32 int_status) Radeon_ThreadInterruptWork(vuint8 *regs, device_info *di, uint32 int_status)
{ {
shared_info *si = di->si; shared_info *si = di->si;
uint32 handled = B_HANDLED_INTERRUPT; int32 handled = B_HANDLED_INTERRUPT;
if ((int_status & RADEON_CRTC_VBLANK_STAT) != 0 if ((int_status & RADEON_CRTC_VBLANK_STAT) != 0
&& si->crtc[0].vblank >= 0) { && si->crtc[0].vblank >= 0) {
@@ -279,7 +279,7 @@ MIIBus::IsLinkUp()
} }
uint32 int32
MIIBus::TimerHandler(bool* linkChanged) MIIBus::TimerHandler(bool* linkChanged)
{ {
// XXX ? // XXX ?
@@ -332,7 +332,7 @@ MIIBus::TimerHandler(bool* linkChanged)
// (fLinkState.media & IFM_FULL_DUPLEX) ? "full" : "half"); // (fLinkState.media & IFM_FULL_DUPLEX) ? "full" : "half");
//} //}
return 0; return B_HANDLED_INTERRUPT;
} }
@@ -113,7 +113,7 @@ public:
status_t Status(uint16 *status); status_t Status(uint16 *status);
status_t Select(uint16* status = NULL); status_t Select(uint16* status = NULL);
status_t Reset(uint16* status = NULL); status_t Reset(uint16* status = NULL);
uint32 TimerHandler(bool* linkChanged); int32 TimerHandler(bool* linkChanged);
bool IsLinkUp(); bool IsLinkUp();
status_t UpdateLinkState(ether_link_state* state = NULL); status_t UpdateLinkState(ether_link_state* state = NULL);
@@ -287,7 +287,7 @@ sis900_timer(timer *t)
if (mode) if (mode)
sis900_setMode(info, mode); sis900_setMode(info, mode);
return 0; return B_HANDLED_INTERRUPT;
} }
if (info->link) { // link lost if (info->link) { // link lost
@@ -322,7 +322,7 @@ sis900_timer(timer *t)
// else // else
// bug("********* set_eq() would be needed! ********\n"); // bug("********* set_eq() would be needed! ********\n");
return 0; return B_HANDLED_INTERRUPT;
} }
@@ -289,7 +289,7 @@ wb_tick(timer* arg)
wb_updateLink(device); wb_updateLink(device);
return B_OK; return B_HANDLED_INTERRUPT;
} }
+2 -2
View File
@@ -16,11 +16,11 @@ static timer sHardClockTimer;
/*! /*!
* Implementation of FreeBSD's hardclock timer. * Implementation of FreeBSD's hardclock timer.
*/ */
static status_t static int32
hardClock(timer* hardClockTimer) hardClock(timer* hardClockTimer)
{ {
atomic_add(&ticks, 1); atomic_add(&ticks, 1);
return B_OK; return B_HANDLED_INTERRUPT;
} }
+2 -2
View File
@@ -16,11 +16,11 @@ static timer sHardClockTimer;
/*! /*!
* Implementation of FreeBSD's hardclock timer. * Implementation of FreeBSD's hardclock timer.
*/ */
static status_t static int32
hardClock(timer* hardClockTimer) hardClock(timer* hardClockTimer)
{ {
atomic_add((vint32*)&ticks, 1); atomic_add((vint32*)&ticks, 1);
return B_OK; return B_HANDLED_INTERRUPT;
} }