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:
Colin Günther
2009-12-29 22:10:04 +00:00
parent b69688c36e
commit 0e39b0b7ce
6 changed files with 8 additions and 8 deletions
@@ -1310,7 +1310,7 @@ ath_intr(void *arg)
* value to insure we only process bits we requested. * value to insure we only process bits we requested.
*/ */
#if defined(__HAIKU__) #if defined(__HAIKU__)
status = atomic_and((int32 *)&sc->sc_intr_status, 0); status = atomic_get((int32 *)&sc->sc_intr_status);
#else #else
ath_hal_getisr(ah, &status); /* NB: clears ISR too */ ath_hal_getisr(ah, &status); /* NB: clears ISR too */
#endif #endif
@@ -46,7 +46,7 @@ HAIKU_CHECK_DISABLE_INTERRUPTS(device_t dev)
// Note: Haiku's pcnet driver uses the same technique of // Note: Haiku's pcnet driver uses the same technique of
// appending a sc_lastisr field. // appending a sc_lastisr field.
ath_hal_getisr(ah, &intr_status); 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); ath_hal_intrset(ah, 0);
// disable further intr's // disable further intr's
@@ -1774,7 +1774,7 @@ wpi_intr(void *arg)
/* disable interrupts */ /* disable interrupts */
WPI_WRITE(sc, WPI_MASK, 0); WPI_WRITE(sc, WPI_MASK, 0);
#else #else
r = atomic_and((int32 *)&sc->sc_intr_status, 0); r = atomic_get((int32 *)&sc->sc_intr_status);
#endif #endif
/* ack interrupts */ /* ack interrupts */
@@ -34,7 +34,7 @@ HAIKU_CHECK_DISABLE_INTERRUPTS(device_t dev)
if ((r = WPI_READ(sc, WPI_INTR)) == 0 || r == 0xffffffff) if ((r = WPI_READ(sc, WPI_INTR)) == 0 || r == 0xffffffff)
return 0; return 0;
atomic_or((int32*)&sc->sc_intr_status, r); atomic_set((int32*)&sc->sc_intr_status, r);
WPI_WRITE(sc, WPI_MASK, 0); WPI_WRITE(sc, WPI_MASK, 0);
// disable interrupts // disable interrupts
@@ -1823,8 +1823,8 @@ iwn_intr(void *arg)
if (r1 == 0xffffffff) if (r1 == 0xffffffff)
goto done; /* hardware gone */ goto done; /* hardware gone */
#else #else
r1 = atomic_and((int32 *)&sc->sc_intr_status_1, 0); r1 = atomic_get((int32 *)&sc->sc_intr_status_1);
r2 = atomic_and((int32 *)&sc->sc_intr_status_2, 0); r2 = atomic_get((int32 *)&sc->sc_intr_status_2);
#endif #endif
/* ack interrupts */ /* ack interrupts */
@@ -45,8 +45,8 @@ HAIKU_CHECK_DISABLE_INTERRUPTS(device_t dev)
// hardware gone // hardware gone
return 0; return 0;
atomic_or((int32*)&sc->sc_intr_status_1, r1); atomic_set((int32*)&sc->sc_intr_status_1, r1);
atomic_or((int32*)&sc->sc_intr_status_2, r2); atomic_set((int32*)&sc->sc_intr_status_2, r2);
IWN_WRITE(sc, IWN_MASK, 0); IWN_WRITE(sc, IWN_MASK, 0);
// disable interrupts // disable interrupts