diff options
author | jhb <jhb@FreeBSD.org> | 2005-07-15 18:17:59 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2005-07-15 18:17:59 +0000 |
commit | c7383aebd6c8822e4076cb0bff21a9b60bfaf2f1 (patch) | |
tree | 9ea05f8294a9d7928ffaf2ba504cd7a6498d78e8 /sys/dev/hatm | |
parent | 78ae67348bdfe1ef3d92615df852da303d06b847 (diff) | |
download | FreeBSD-src-c7383aebd6c8822e4076cb0bff21a9b60bfaf2f1.zip FreeBSD-src-c7383aebd6c8822e4076cb0bff21a9b60bfaf2f1.tar.gz |
Convert the atomic_ptr() operations over to operating on uintptr_t
variables rather than void * variables. This makes it easier and simpler
to get asm constraints and volatile keywords correct.
MFC after: 3 days
Tested on: i386, alpha, sparc64
Compiled on: ia64, powerpc, amd64
Kernel toolchain busted on: arm
Diffstat (limited to 'sys/dev/hatm')
-rw-r--r-- | sys/dev/hatm/if_hatm_intr.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/hatm/if_hatm_intr.c b/sys/dev/hatm/if_hatm_intr.c index 9ee64d7..3da034f 100644 --- a/sys/dev/hatm/if_hatm_intr.c +++ b/sys/dev/hatm/if_hatm_intr.c @@ -115,7 +115,8 @@ hatm_ext_free(struct mbufx_free **list, struct mbufx_free *buf) { for (;;) { buf->link = *list; - if (atomic_cmpset_ptr(list, buf->link, buf)) + if (atomic_cmpset_ptr((uintptr_t *)list, (uintptr_t)buf->link, + (uintptr_t)buf)) break; } } @@ -128,7 +129,8 @@ hatm_ext_alloc(struct hatm_softc *sc, u_int g) for (;;) { if ((buf = sc->mbuf_list[g]) == NULL) break; - if (atomic_cmpset_ptr(&sc->mbuf_list[g], buf, buf->link)) + if (atomic_cmpset_ptr((uintptr_t *)&sc->mbuf_list[g], + (uintptr_t)buf, (uintptr_t)buf->link)) break; } if (buf == NULL) { @@ -136,7 +138,8 @@ hatm_ext_alloc(struct hatm_softc *sc, u_int g) for (;;) { if ((buf = sc->mbuf_list[g]) == NULL) break; - if (atomic_cmpset_ptr(&sc->mbuf_list[g], buf, buf->link)) + if (atomic_cmpset_ptr((uintptr_t *)&sc->mbuf_list[g], + (uintptr_t)buf, (uintptr_t)buf->link)) break; } } |