diff options
author | rrs <rrs@FreeBSD.org> | 2006-11-05 13:25:18 +0000 |
---|---|---|
committer | rrs <rrs@FreeBSD.org> | 2006-11-05 13:25:18 +0000 |
commit | 20dc61d3a46238522e738dd8dde26965d5ce46dd (patch) | |
tree | 0917b677ec5366916adb9fc52ff977feb016deb1 /sys/netinet/sctp_pcb.c | |
parent | 21ab4f8a250dc1903e52406d7a88f2bc912fb733 (diff) | |
download | FreeBSD-src-20dc61d3a46238522e738dd8dde26965d5ce46dd.zip FreeBSD-src-20dc61d3a46238522e738dd8dde26965d5ce46dd.tar.gz |
Tons of fixes to get all the 64bit issues removed.
This also moves two 16 bit int's to become 32 bit
values so we do not have to use atomic_add_16.
Most of the changes are %p, casts and other various
nasty's that were in the orignal code base. With this
commit my machine will now do a build universe.. however
I as yet have not tested on a 64bit machine .. it may not work :-(
Diffstat (limited to 'sys/netinet/sctp_pcb.c')
-rw-r--r-- | sys/netinet/sctp_pcb.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index cc17c55..0a5ca58 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -3391,7 +3391,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int from_inpcbfre * timer a passing stranger may have started :-S */ if (from_inpcbfree == 0) { - atomic_add_16(&stcb->asoc.refcnt, 1); + atomic_add_int(&stcb->asoc.refcnt, 1); SCTP_TCB_UNLOCK(stcb); @@ -3410,7 +3410,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int from_inpcbfre sctp_iterator_asoc_being_freed(inp, stcb); /* re-increment the lock */ if (from_inpcbfree == 0) { - atomic_add_16(&stcb->asoc.refcnt, -1); + atomic_add_int(&stcb->asoc.refcnt, -1); } /* now restop the timers to be sure - this is paranoia at is finest! */ callout_stop(&asoc->hb_timer.timer); @@ -4379,9 +4379,9 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m, /* does the source address already exist? if so skip it */ l_inp = inp = stcb->sctp_ep; - atomic_add_16(&stcb->asoc.refcnt, 1); + atomic_add_int(&stcb->asoc.refcnt, 1); stcb_tmp = sctp_findassociation_ep_addr(&inp, sa, &net_tmp, local_sa, stcb); - atomic_add_16(&stcb->asoc.refcnt, -1); + atomic_add_int(&stcb->asoc.refcnt, -1); if ((stcb_tmp == NULL && inp == stcb->sctp_ep) || inp == NULL) { /* we must add the source address */ @@ -4440,10 +4440,10 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m, sin.sin_addr.s_addr = p4->addr; sa = (struct sockaddr *)&sin; inp = stcb->sctp_ep; - atomic_add_16(&stcb->asoc.refcnt, 1); + atomic_add_int(&stcb->asoc.refcnt, 1); stcb_tmp = sctp_findassociation_ep_addr(&inp, sa, &net, local_sa, stcb); - atomic_add_16(&stcb->asoc.refcnt, -1); + atomic_add_int(&stcb->asoc.refcnt, -1); if ((stcb_tmp == NULL && inp == stcb->sctp_ep) || inp == NULL) { @@ -4502,10 +4502,10 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m, sizeof(p6->addr)); sa = (struct sockaddr *)&sin6; inp = stcb->sctp_ep; - atomic_add_16(&stcb->asoc.refcnt, 1); + atomic_add_int(&stcb->asoc.refcnt, 1); stcb_tmp = sctp_findassociation_ep_addr(&inp, sa, &net, local_sa, stcb); - atomic_add_16(&stcb->asoc.refcnt, -1); + atomic_add_int(&stcb->asoc.refcnt, -1); if (stcb_tmp == NULL && (inp == stcb->sctp_ep || inp == NULL)) { /* |