Switching from atomic_{and|or} or to atomic_{set|get} as this reads more
natural and spares even one atomic call in syskonnect. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34822 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
5ce504e289
commit
210124c810
@ -47,7 +47,7 @@ __haiku_disable_interrupts(device_t dev)
|
||||
|
||||
CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_STAT_ENB);
|
||||
CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_INTR_ACK | (status & XL_INTRS));
|
||||
atomic_or((int32 *)&sc->xl_intr_status, status);
|
||||
atomic_set((int32 *)&sc->xl_intr_status, status);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -2290,7 +2290,7 @@ xl_intr(void *arg)
|
||||
while ((status = CSR_READ_2(sc, XL_STATUS)) & XL_INTRS &&
|
||||
status != 0xFFFF) {
|
||||
#else
|
||||
status = atomic_and((int32 *)&sc->xl_intr_status, 0);
|
||||
status = atomic_get((int32 *)&sc->xl_intr_status);
|
||||
while (true) {
|
||||
#endif
|
||||
if (status & XL_STAT_UP_COMPLETE) {
|
||||
|
@ -71,7 +71,7 @@ __haiku_disable_interrupts(device_t dev)
|
||||
|
||||
HAIKU_INTR_REGISTER_LEAVE();
|
||||
|
||||
atomic_or((int32 *)&sc->sk_intstatus, status);
|
||||
atomic_set((int32 *)&sc->sk_intstatus, status);
|
||||
return status & sc->sk_intrmask;
|
||||
}
|
||||
|
||||
|
@ -1815,10 +1815,6 @@ skc_attach(dev)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* Hook interrupt last to avoid having to lock softc */
|
||||
#ifdef __HAIKU__
|
||||
atomic_and((int32 *)&sc->sk_intstatus, 0);
|
||||
#endif
|
||||
error = bus_setup_intr(dev, sc->sk_res[1], INTR_TYPE_NET|INTR_MPSAFE/*|INTR_FAST*/,
|
||||
NULL, sk_intr, sc, &sc->sk_intrhand);
|
||||
|
||||
@ -3265,7 +3261,7 @@ sk_intr(xsc)
|
||||
#ifndef __HAIKU__
|
||||
for (; (status &= sc->sk_intrmask) != 0;) {
|
||||
#else
|
||||
status = atomic_and((int32 *)&sc->sk_intstatus, 0);
|
||||
status = atomic_get((int32 *)&sc->sk_intstatus);
|
||||
status &= sc->sk_intrmask;
|
||||
while (true) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user