Using atomic_{set|get} as proposed by Axel.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34813 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1310,7 +1310,7 @@ ath_intr(void *arg)
|
||||
* value to insure we only process bits we requested.
|
||||
*/
|
||||
#if defined(__HAIKU__)
|
||||
status = atomic_and((int32 *)&sc->sc_intr_status, 0);
|
||||
status = atomic_get((int32 *)&sc->sc_intr_status);
|
||||
#else
|
||||
ath_hal_getisr(ah, &status); /* NB: clears ISR too */
|
||||
#endif
|
||||
|
||||
@@ -46,7 +46,7 @@ HAIKU_CHECK_DISABLE_INTERRUPTS(device_t dev)
|
||||
// Note: Haiku's pcnet driver uses the same technique of
|
||||
// appending a sc_lastisr field.
|
||||
ath_hal_getisr(ah, &intr_status);
|
||||
atomic_or((int32*)&sc->sc_intr_status, intr_status);
|
||||
atomic_set((int32*)&sc->sc_intr_status, intr_status);
|
||||
|
||||
ath_hal_intrset(ah, 0);
|
||||
// disable further intr's
|
||||
|
||||
@@ -1774,7 +1774,7 @@ wpi_intr(void *arg)
|
||||
/* disable interrupts */
|
||||
WPI_WRITE(sc, WPI_MASK, 0);
|
||||
#else
|
||||
r = atomic_and((int32 *)&sc->sc_intr_status, 0);
|
||||
r = atomic_get((int32 *)&sc->sc_intr_status);
|
||||
#endif
|
||||
|
||||
/* ack interrupts */
|
||||
|
||||
@@ -34,7 +34,7 @@ HAIKU_CHECK_DISABLE_INTERRUPTS(device_t dev)
|
||||
if ((r = WPI_READ(sc, WPI_INTR)) == 0 || r == 0xffffffff)
|
||||
return 0;
|
||||
|
||||
atomic_or((int32*)&sc->sc_intr_status, r);
|
||||
atomic_set((int32*)&sc->sc_intr_status, r);
|
||||
|
||||
WPI_WRITE(sc, WPI_MASK, 0);
|
||||
// disable interrupts
|
||||
|
||||
@@ -1823,8 +1823,8 @@ iwn_intr(void *arg)
|
||||
if (r1 == 0xffffffff)
|
||||
goto done; /* hardware gone */
|
||||
#else
|
||||
r1 = atomic_and((int32 *)&sc->sc_intr_status_1, 0);
|
||||
r2 = atomic_and((int32 *)&sc->sc_intr_status_2, 0);
|
||||
r1 = atomic_get((int32 *)&sc->sc_intr_status_1);
|
||||
r2 = atomic_get((int32 *)&sc->sc_intr_status_2);
|
||||
#endif
|
||||
|
||||
/* ack interrupts */
|
||||
|
||||
@@ -45,8 +45,8 @@ HAIKU_CHECK_DISABLE_INTERRUPTS(device_t dev)
|
||||
// hardware gone
|
||||
return 0;
|
||||
|
||||
atomic_or((int32*)&sc->sc_intr_status_1, r1);
|
||||
atomic_or((int32*)&sc->sc_intr_status_2, r2);
|
||||
atomic_set((int32*)&sc->sc_intr_status_1, r1);
|
||||
atomic_set((int32*)&sc->sc_intr_status_2, r2);
|
||||
|
||||
IWN_WRITE(sc, IWN_MASK, 0);
|
||||
// disable interrupts
|
||||
|
||||
Reference in New Issue
Block a user