- Change the ATM stack functions to use intptr_t instead of int for opaque

arguments.
- Fix a few other places that assumed that sizeof(int) == sizeof(void *).

Reviewed by:	mdodd
This commit is contained in:
John Baldwin 2002-11-08 18:27:30 +00:00
parent 5650d1726f
commit 672cc99ed3
33 changed files with 209 additions and 206 deletions

View File

@ -103,7 +103,7 @@ eni_test_memory ( eup )
* Walk through to maximum looking for RAM
*/
for ( i = 0; i < MAX_ENI_MEM; i += TEST_STEP ) {
mp = (Eni_mem)((int)eup->eu_ram + i);
mp = (Eni_mem)((intptr_t)eup->eu_ram + i);
/* write pattern */
*mp = (u_long)TEST_PAT;
/* read pattern, match? */
@ -254,7 +254,7 @@ eni_allocate_buffer ( eup, size )
* Request will fit - now check if the
* alignment needs fixing
*/
if ( ((u_int)eptr->base & (nsize-1)) != 0 )
if ( ((uintptr_t)eptr->base & (nsize-1)) != 0 )
{
caddr_t nbase;
@ -262,7 +262,7 @@ eni_allocate_buffer ( eup, size )
* Calculate where the buffer would have to
* fall to be aligned.
*/
nbase = (caddr_t)((u_int)( eptr->base + nsize ) &
nbase = (caddr_t)((uintptr_t)( eptr->base + nsize ) &
~(nsize-1));
/*
* If we use this alignment, will it still fit?

View File

@ -200,7 +200,7 @@ eni_openvcc ( cup, cvp )
vct->vci_control = mode << VCI_MODE_SHIFT |
PTI_MODE_TRASH << VCI_PTI_SHIFT |
( (u_int)(evp->ev_rxbuf) >> ENI_LOC_PREDIV ) << VCI_LOC_SHIFT |
( (uintptr_t)(evp->ev_rxbuf) >> ENI_LOC_PREDIV ) << VCI_LOC_SHIFT |
nsize << VCI_SIZE_SHIFT;
vct->vci_descr = 0; /* Descr = Rdptr = 0 */
vct->vci_write = 0; /* WritePtr = CellCount = 0 */

View File

@ -69,9 +69,9 @@ struct atm_cm_stat atm_cm_stat = {0};
/*
* Local functions
*/
static void atm_cm_cpcs_upper(int, void *, int, int);
static void atm_cm_saal_upper(int, void *, int, int);
static void atm_cm_sscop_upper(int, void *, int, int);
static void atm_cm_cpcs_upper(int, void *, intptr_t, intptr_t);
static void atm_cm_saal_upper(int, void *, intptr_t, intptr_t);
static void atm_cm_sscop_upper(int, void *, intptr_t, intptr_t);
static Atm_connvc * atm_cm_share_llc(Atm_attributes *);
static void atm_cm_closeconn(Atm_connection *,
struct t_atm_cause *);
@ -165,7 +165,7 @@ atm_cm_connect(epp, token, ap, copp)
struct atm_pif *pip;
struct sigmgr *smp;
struct stack_list sl;
void (*upf)(int, void *, int, int);
void (*upf)(int, void *, intptr_t, intptr_t);
int s, sli, err, err2;
*copp = NULL;
@ -1432,7 +1432,7 @@ atm_cm_connected(cvp)
/*
* Currently only supported for CPCS API
*/
atm_cm_cpcs_upper(CPCS_UNITDATA_SIG, cvp, (int)m, 0);
atm_cm_cpcs_upper(CPCS_UNITDATA_SIG, cvp, (intptr_t)m, 0);
}
return;
@ -1761,7 +1761,7 @@ atm_cm_accept(cvp, cop)
Atm_connection *cop;
{
struct stack_list sl;
void (*upf)(int, void *, int, int);
void (*upf)(int, void *, intptr_t, intptr_t);
int sli, err, err2;
@ -2810,7 +2810,7 @@ atm_cm_cpcs_data(cop, m)
* Finally, we can send the packet on its way
*/
STACK_CALL(CPCS_UNITDATA_INV, cvp->cvc_lower, cvp->cvc_tokl,
cvp, (int)m, 0, err);
cvp, (intptr_t)m, 0, err);
done:
return (err);
@ -2837,8 +2837,8 @@ static void
atm_cm_cpcs_upper(cmd, tok, arg1, arg2)
int cmd;
void *tok;
int arg1;
int arg2;
intptr_t arg1;
intptr_t arg2;
{
Atm_connection *cop;
Atm_connvc *cvp = tok;
@ -3017,7 +3017,7 @@ atm_cm_saal_ctl(cmd, cop, arg)
* Pass command down the stack
*/
STACK_CALL(cmd, cvp->cvc_lower, cvp->cvc_tokl, cvp,
(int)arg, 0, err);
(intptr_t)arg, 0, err);
break;
default:
@ -3077,7 +3077,7 @@ atm_cm_saal_data(cop, m)
* Finally, we can send the packet on its way
*/
STACK_CALL(SSCF_UNI_DATA_REQ, cvp->cvc_lower, cvp->cvc_tokl,
cvp, (int)m, 0, err);
cvp, (intptr_t)m, 0, err);
done:
return (err);
@ -3104,8 +3104,8 @@ static void
atm_cm_saal_upper(cmd, tok, arg1, arg2)
int cmd;
void *tok;
int arg1;
int arg2;
intptr_t arg1;
intptr_t arg2;
{
Atm_connection *cop;
Atm_connvc *cvp = tok;
@ -3221,7 +3221,7 @@ atm_cm_sscop_ctl(cmd, cop, arg1, arg2)
* Pass command down the stack
*/
STACK_CALL(cmd, cvp->cvc_lower, cvp->cvc_tokl, cvp,
(int)arg1, (int)arg2, err);
(intptr_t)arg1, (intptr_t)arg2, err);
break;
default:
@ -3281,7 +3281,7 @@ atm_cm_sscop_data(cop, m)
* Finally, we can send the packet on its way
*/
STACK_CALL(SSCOP_DATA_REQ, cvp->cvc_lower, cvp->cvc_tokl,
cvp, (int)m, 0, err);
cvp, (intptr_t)m, 0, err);
done:
return (err);
@ -3308,8 +3308,8 @@ static void
atm_cm_sscop_upper(cmd, tok, arg1, arg2)
int cmd;
void *tok;
int arg1;
int arg2;
intptr_t arg1;
intptr_t arg2;
{
Atm_connection *cop;
Atm_connvc *cvp = tok;

View File

@ -288,7 +288,7 @@ struct atm_connvc {
u_char cvc_state; /* CM - VCC state (see below) */
void *cvc_tokl; /* Stack lower layer token */
void (*cvc_lower) /* Stack lower layer handler */
(int, void *, int, int);
(int, void *, intptr_t, intptr_t);
u_short cvc_upcnt; /* Up stack calls in progress */
u_short cvc_downcnt; /* Down stack calls in progress */
KBuffer *cvc_rcvq; /* Packet receive queue */

View File

@ -237,8 +237,8 @@ void
atm_dev_lower(cmd, tok, arg1, arg2)
int cmd;
void *tok;
int arg1;
int arg2;
intptr_t arg1;
intptr_t arg2;
{
Cmn_vcc *cvp = (Cmn_vcc *)tok;
Atm_connvc *cvcp = cvp->cv_connvc;
@ -324,7 +324,7 @@ atm_dev_lower(cmd, tok, arg1, arg2)
*/
KB_DATASTART(m, ip, int *);
ip++;
if (*ip == (int)cvp) {
if (*ip == (intptr_t)cvp) {
/*
* Yep, so dequeue the entry
*/
@ -499,7 +499,7 @@ atm_dev_alloc(size, align, flags)
/*
* Calculate correct alignment address to pass back to user
*/
mep->me_uaddr = (void *) roundup((u_int)mep->me_kaddr, align);
mep->me_uaddr = (void *) roundup((uintptr_t)mep->me_kaddr, align);
mep->me_ksize = ksize;
mep->me_flags = flags;

View File

@ -960,7 +960,7 @@ atm_nif_setaddr(nip, ifa)
* Notify convergence modules of network i/f change
*/
for (ncp = atm_netconv_head; ncp; ncp = ncp->ncm_next) {
err = (*ncp->ncm_stat)(NCM_SETADDR, nip, (int)ifa);
err = (*ncp->ncm_stat)(NCM_SETADDR, nip, (intptr_t)ifa);
if (err)
break;
}

View File

@ -224,7 +224,7 @@ struct cmn_vcc {
struct cmn_vcc *cv_next; /* Next in list */
void *cv_toku; /* Upper layer's token */
void (*cv_upper) /* Upper layer's interface */
(int, void *, int, int);
(int, void *, intptr_t, intptr_t);
Atm_connvc *cv_connvc; /* Associated connection VCC */
u_char cv_state; /* VCC state (see below) */
u_char cv_flags; /* VCC flags (see below) */
@ -305,7 +305,7 @@ struct atm_ncm {
int (*ncm_ifoutput) /* Interface if_output handler */
(struct ifnet *, KBuffer *, struct sockaddr *);
int (*ncm_stat) /* Network i/f status handler */
(int, struct atm_nif *, int);
(int, struct atm_nif *, intptr_t);
};
/*

View File

@ -431,7 +431,7 @@ int
atm_create_stack(cvp, tlp, upf)
Atm_connvc *cvp;
struct stack_list *tlp;
void (*upf)(int, void *, int, int);
void (*upf)(int, void *, intptr_t, intptr_t);
{
struct stack_defn *sdp, usd;
struct stack_inst svs;

View File

@ -55,9 +55,9 @@ struct stack_defn {
int (*sd_inst) /* Stack instantiation */
(struct stack_defn **, Atm_connvc *);
void (*sd_lower) /* Lower (from above) command handler */
(int, void *, int, int);
(int, void *, intptr_t, intptr_t);
void (*sd_upper) /* Upper (from below) command handler */
(int, void *, int, int);
(int, void *, intptr_t, intptr_t);
/* Variables used during stack instantiation */
void *sd_toku; /* Stack service instance token */
};
@ -266,10 +266,10 @@ struct stackq_entry {
struct stackq_entry *sq_next; /* Next entry in queue */
int sq_cmd; /* Stack command */
void (*sq_func) /* Destination function */
(int, void *, int, int);
(int, void *, intptr_t, intptr_t);
void *sq_token; /* Destination token */
int sq_arg1; /* Command-specific argument */
int sq_arg2; /* Command-specific argument */
intptr_t sq_arg1; /* Command-specific argument */
intptr_t sq_arg2; /* Command-specific argument */
Atm_connvc *sq_connvc; /* Connection VCC */
};

View File

@ -380,11 +380,11 @@ atm_untimeout(tip)
int
atm_stack_enq(cmd, func, token, cvp, arg1, arg2)
int cmd;
void (*func)(int, void *, int, int);
void (*func)(int, void *, intptr_t, intptr_t);
void *token;
Atm_connvc *cvp;
int arg1;
int arg2;
intptr_t arg1;
intptr_t arg2;
{
struct stackq_entry *sqp;
int s = splnet();

View File

@ -105,7 +105,7 @@ int atm_endpoint_deregister(Atm_endpoint *);
/* atm_device.c */
int atm_dev_inst(struct stack_defn **, Atm_connvc *);
void atm_dev_lower(int, void *, int, int);
void atm_dev_lower(int, void *, intptr_t, intptr_t);
void * atm_dev_alloc(u_int, u_int, u_int);
void atm_dev_free(volatile void *);
KBuffer * atm_dev_compress(KBuffer *);
@ -145,7 +145,7 @@ int atm_sigmgr_detach(struct atm_pif *);
int atm_stack_register(struct stack_defn *);
int atm_stack_deregister(struct stack_defn *);
int atm_create_stack(Atm_connvc *, struct stack_list *,
void (*)(int, void *, int, int) );
void (*)(int, void *, intptr_t, intptr_t) );
/* atm_socket.c */
void atm_sock_init(void);
@ -170,8 +170,8 @@ void atm_initialize(void);
void atm_timeout(struct atm_time *, int,
void (*)(struct atm_time *) );
int atm_untimeout(struct atm_time *);
int atm_stack_enq(int, void (*)(int, void *, int, int),
void *, Atm_connvc *, int, int);
int atm_stack_enq(int, void (*)(int, void *, intptr_t, intptr_t),
void *, Atm_connvc *, intptr_t, intptr_t);
void atm_stack_drain(void);
void atm_intr(void);
void atm_pdu_print(KBuffer *, char *);

View File

@ -92,7 +92,7 @@ int
ipatm_nifstat(cmd, nip, arg)
int cmd;
struct atm_nif *nip;
int arg;
intptr_t arg;
{
struct in_ifaddr *ia;
struct siginst *sip;

View File

@ -460,7 +460,8 @@ ipatm_start()
break;
}
if (ia) {
err = ipatm_nifstat(NCM_SETADDR, nip, (int)ia);
err = ipatm_nifstat(NCM_SETADDR, nip,
(intptr_t)ia);
if (err) {
(void) splx(s);
goto done;
@ -523,7 +524,7 @@ ipatm_start()
/*
* Now start listening
*/
if ((err = atm_cm_listen(&ipatm_endpt, (void *)i,
if ((err = atm_cm_listen(&ipatm_endpt, (void *)(intptr_t)i,
&ipatm_listeners[i].attr,
&ipatm_listeners[i].conn)) != 0)
goto done;

View File

@ -162,7 +162,7 @@ void ipatm_arpnotify(struct ipvcc *, int);
void ipatm_itimeout(struct atm_time *);
/* ipatm_if.c */
int ipatm_nifstat(int, struct atm_nif *, int);
int ipatm_nifstat(int, struct atm_nif *, intptr_t);
/* ipatm_input.c */
void ipatm_cpcs_data(void *, KBuffer *);

View File

@ -244,10 +244,10 @@ typedef struct mbuf KBuffer;
#define KB_TAILALIGN(bfr, n) { \
(bfr)->m_len = (n); \
if ((bfr)->m_flags & M_EXT) \
(bfr)->m_data = (caddr_t)(((u_int)(bfr)->m_ext.ext_buf \
(bfr)->m_data = (caddr_t)(((uintptr_t)(bfr)->m_ext.ext_buf \
+ (bfr)->m_ext.ext_size - (n)) & ~(sizeof(long) - 1));\
else \
(bfr)->m_data = (caddr_t)(((u_int)(bfr)->m_dat + MLEN - (n)) \
(bfr)->m_data = (caddr_t)(((uintptr_t)(bfr)->m_dat + MLEN - (n)) \
& ~(sizeof(long) - 1)); \
}
#define KB_HEADROOM(bfr, n) { \

View File

@ -678,5 +678,5 @@ xdrmbuf_getpos(xdrs)
register XDR *xdrs;
{
return ((u_int)xdrs->x_private - (u_int)xdrs->x_base);
return ((uintptr_t)xdrs->x_private - (uintptr_t)xdrs->x_base);
}

View File

@ -58,10 +58,10 @@ __RCSID("@(#) $FreeBSD$");
/*
* Local functions
*/
static void sscop_resreq_ready(struct sscop *, int, int);
static void sscop_resrsp_inresyn(struct sscop *, int, int);
static void sscop_recrsp_recovrsp(struct sscop *, int, int);
static void sscop_recrsp_inrecov(struct sscop *, int, int);
static void sscop_resreq_ready(struct sscop *, intptr_t, intptr_t);
static void sscop_resrsp_inresyn(struct sscop *, intptr_t, intptr_t);
static void sscop_recrsp_recovrsp(struct sscop *, intptr_t, intptr_t);
static void sscop_recrsp_inrecov(struct sscop *, intptr_t, intptr_t);
/*
@ -69,7 +69,7 @@ static void sscop_recrsp_inrecov(struct sscop *, int, int);
*/
/* SSCOP_INIT */
static void (*sscop_init_tab[SOS_NUMSTATES])
(struct sscop *, int, int) = {
(struct sscop *, intptr_t, intptr_t) = {
sscop_init_inst, /* SOS_INST */
NULL, /* SOS_IDLE */
NULL, /* SOS_OUTCONN */
@ -86,7 +86,7 @@ static void (*sscop_init_tab[SOS_NUMSTATES])
/* SSCOP_TERM */
static void (*sscop_term_tab[SOS_NUMSTATES])
(struct sscop *, int, int) = {
(struct sscop *, intptr_t, intptr_t) = {
sscop_term_all, /* SOS_INST */
sscop_term_all, /* SOS_IDLE */
sscop_term_all, /* SOS_OUTCONN */
@ -103,7 +103,7 @@ static void (*sscop_term_tab[SOS_NUMSTATES])
/* SSCOP_ESTABLISH_REQ */
static void (*sscop_estreq_tab[SOS_NUMSTATES])
(struct sscop *, int, int) = {
(struct sscop *, intptr_t, intptr_t) = {
NULL, /* SOS_INST */
sscop_estreq_idle, /* SOS_IDLE */
NULL, /* SOS_OUTCONN */
@ -120,7 +120,7 @@ static void (*sscop_estreq_tab[SOS_NUMSTATES])
/* SSCOP_ESTABLISH_RSP */
static void (*sscop_estrsp_tab[SOS_NUMSTATES])
(struct sscop *, int, int) = {
(struct sscop *, intptr_t, intptr_t) = {
NULL, /* SOS_INST */
NULL, /* SOS_IDLE */
NULL, /* SOS_OUTCONN */
@ -137,7 +137,7 @@ static void (*sscop_estrsp_tab[SOS_NUMSTATES])
/* SSCOP_RELEASE_REQ */
static void (*sscop_relreq_tab[SOS_NUMSTATES])
(struct sscop *, int, int) = {
(struct sscop *, intptr_t, intptr_t) = {
NULL, /* SOS_INST */
NULL, /* SOS_IDLE */
sscop_relreq_outconn, /* SOS_OUTCONN */
@ -154,7 +154,7 @@ static void (*sscop_relreq_tab[SOS_NUMSTATES])
/* SSCOP_DATA_REQ */
static void (*sscop_datreq_tab[SOS_NUMSTATES])
(struct sscop *, int, int) = {
(struct sscop *, intptr_t, intptr_t) = {
NULL, /* SOS_INST */
NULL, /* SOS_IDLE */
NULL, /* SOS_OUTCONN */
@ -171,7 +171,7 @@ static void (*sscop_datreq_tab[SOS_NUMSTATES])
/* SSCOP_RESYNC_REQ */
static void (*sscop_resreq_tab[SOS_NUMSTATES])
(struct sscop *, int, int) = {
(struct sscop *, intptr_t, intptr_t) = {
NULL, /* SOS_INST */
NULL, /* SOS_IDLE */
NULL, /* SOS_OUTCONN */
@ -188,7 +188,7 @@ static void (*sscop_resreq_tab[SOS_NUMSTATES])
/* SSCOP_RESYNC_RSP */
static void (*sscop_resrsp_tab[SOS_NUMSTATES])
(struct sscop *, int, int) = {
(struct sscop *, intptr_t, intptr_t) = {
NULL, /* SOS_INST */
NULL, /* SOS_IDLE */
NULL, /* SOS_OUTCONN */
@ -205,7 +205,7 @@ static void (*sscop_resrsp_tab[SOS_NUMSTATES])
/* SSCOP_RECOVER_RSP */
static void (*sscop_recrsp_tab[SOS_NUMSTATES])
(struct sscop *, int, int) = {
(struct sscop *, intptr_t, intptr_t) = {
NULL, /* SOS_INST */
NULL, /* SOS_IDLE */
NULL, /* SOS_OUTCONN */
@ -222,7 +222,7 @@ static void (*sscop_recrsp_tab[SOS_NUMSTATES])
/* SSCOP_UNITDATA_REQ */
static void (*sscop_udtreq_tab[SOS_NUMSTATES])
(struct sscop *, int, int) = {
(struct sscop *, intptr_t, intptr_t) = {
NULL, /* SOS_INST */
sscop_udtreq_all, /* SOS_IDLE */
sscop_udtreq_all, /* SOS_OUTCONN */
@ -239,7 +239,7 @@ static void (*sscop_udtreq_tab[SOS_NUMSTATES])
/* SSCOP_RETRIEVE_REQ */
static void (*sscop_retreq_tab[SOS_NUMSTATES])
(struct sscop *, int, int) = {
(struct sscop *, intptr_t, intptr_t) = {
NULL, /* SOS_INST */
NULL, /* SOS_IDLE */
NULL, /* SOS_OUTCONN */
@ -259,7 +259,7 @@ static void (*sscop_retreq_tab[SOS_NUMSTATES])
* Stack command lookup table
*/
void (*(*sscop_q2110_aatab[SSCOP_CMD_SIZE]))
(struct sscop *, int, int) = {
(struct sscop *, intptr_t, intptr_t) = {
NULL,
sscop_init_tab,
sscop_term_tab,
@ -314,8 +314,8 @@ void (*(*sscop_q2110_aatab[SSCOP_CMD_SIZE]))
static void
sscop_resreq_ready(sop, arg1, arg2)
struct sscop *sop;
int arg1;
int arg2;
intptr_t arg1;
intptr_t arg2;
{
/*
@ -379,8 +379,8 @@ sscop_resreq_ready(sop, arg1, arg2)
static void
sscop_resrsp_inresyn(sop, arg1, arg2)
struct sscop *sop;
int arg1;
int arg2;
intptr_t arg1;
intptr_t arg2;
{
/*
@ -429,8 +429,8 @@ sscop_resrsp_inresyn(sop, arg1, arg2)
static void
sscop_recrsp_recovrsp(sop, arg1, arg2)
struct sscop *sop;
int arg1;
int arg2;
intptr_t arg1;
intptr_t arg2;
{
/*
@ -480,8 +480,8 @@ sscop_recrsp_recovrsp(sop, arg1, arg2)
static void
sscop_recrsp_inrecov(sop, arg1, arg2)
struct sscop *sop;
int arg1;
int arg2;
intptr_t arg1;
intptr_t arg2;
{
/*

View File

@ -422,7 +422,7 @@ sscop_bgn_outconn(sop, m, trlr)
* Notify user of connection establishment
*/
STACK_CALL(SSCOP_ESTABLISH_CNF, sop->so_upper, sop->so_toku,
sop->so_connvc, (int)m, 0, err);
sop->so_connvc, (intptr_t)m, 0, err);
if (err) {
KB_FREEALL(m);
sscop_abort(sop, "stack memory\n");
@ -499,7 +499,7 @@ sscop_bgn_inconn(sop, m, trlr)
* Now, tell user of new connection establishment
*/
STACK_CALL(SSCOP_ESTABLISH_IND, sop->so_upper, sop->so_toku,
sop->so_connvc, (int)m, 0, err);
sop->so_connvc, (intptr_t)m, 0, err);
if (err) {
KB_FREEALL(m);
sscop_abort(sop, "stack memory\n");
@ -574,7 +574,7 @@ sscop_bgn_ready(sop, m, trlr)
* Tell user of incoming connection
*/
STACK_CALL(SSCOP_ESTABLISH_IND, sop->so_upper, sop->so_toku,
sop->so_connvc, (int)m, 0, err);
sop->so_connvc, (intptr_t)m, 0, err);
if (err) {
KB_FREEALL(m);
sscop_abort(sop, "stack memory\n");
@ -687,7 +687,7 @@ sscop_end_outrecov(sop, m, trlr)
* Notify user of connection termination
*/
STACK_CALL(SSCOP_RELEASE_IND, sop->so_upper, sop->so_toku,
sop->so_connvc, (int)m, source, err);
sop->so_connvc, (intptr_t)m, source, err);
if (err) {
KB_FREEALL(m);
sscop_abort(sop, "stack memory\n");
@ -754,7 +754,7 @@ sscop_end_ready(sop, m, trlr)
* Notify user of connection termination
*/
STACK_CALL(SSCOP_RELEASE_IND, sop->so_upper, sop->so_toku,
sop->so_connvc, (int)m, source, err);
sop->so_connvc, (intptr_t)m, source, err);
if (err) {
KB_FREEALL(m);
sscop_abort(sop, "stack memory\n");
@ -991,7 +991,7 @@ sscop_rs_outrecov(sop, m, trlr)
* Notify user of connection resynchronization
*/
STACK_CALL(SSCOP_RESYNC_IND, sop->so_upper, sop->so_toku,
sop->so_connvc, (int)m, 0, err);
sop->so_connvc, (intptr_t)m, 0, err);
if (err) {
KB_FREEALL(m);
sscop_abort(sop, "stack memory\n");
@ -1060,7 +1060,7 @@ sscop_rs_ready(sop, m, trlr)
* Notify user of connection resynchronization
*/
STACK_CALL(SSCOP_RESYNC_IND, sop->so_upper, sop->so_toku,
sop->so_connvc, (int)m, 0, err);
sop->so_connvc, (intptr_t)m, 0, err);
if (err) {
KB_FREEALL(m);
sscop_abort(sop, "stack memory\n");
@ -1549,7 +1549,7 @@ sscop_sd_ready(sop, m, trlr)
*/
if (ns == sop->so_rcvnext) {
STACK_CALL(SSCOP_DATA_IND, sop->so_upper, sop->so_toku,
sop->so_connvc, (int)m, ns, err);
sop->so_connvc, (intptr_t)m, ns, err);
if (err) {
KB_FREEALL(m);
return;
@ -1591,8 +1591,8 @@ sscop_sd_ready(sop, m, trlr)
if (sop->so_recv_hd == NULL)
sop->so_recv_tl = NULL;
STACK_CALL(SSCOP_DATA_IND, sop->so_upper, sop->so_toku,
sop->so_connvc, (int)php->ph_buf, php->ph_ns,
err);
sop->so_connvc, (intptr_t)php->ph_buf,
php->ph_ns, err);
if (err) {
/*
* Should never happen, but...

View File

@ -58,11 +58,11 @@ __RCSID("@(#) $FreeBSD$");
/*
* Local functions
*/
static void sscop_estreq_ready(struct sscop *, int, int);
static void sscop_datreq_outconn(struct sscop *, int, int);
static void sscop_resreq_ready(struct sscop *, int, int);
static void sscop_resrsp_inresyn(struct sscop *, int, int);
static void sscop_resrsp_conresyn(struct sscop *, int, int);
static void sscop_estreq_ready(struct sscop *, intptr_t, intptr_t);
static void sscop_datreq_outconn(struct sscop *, intptr_t, intptr_t);
static void sscop_resreq_ready(struct sscop *, intptr_t, intptr_t);
static void sscop_resrsp_inresyn(struct sscop *, intptr_t, intptr_t);
static void sscop_resrsp_conresyn(struct sscop *, intptr_t, intptr_t);
/*
@ -70,7 +70,7 @@ static void sscop_resrsp_conresyn(struct sscop *, int, int);
*/
/* SSCOP_INIT */
static void (*sscop_init_tab[SOS_NUMSTATES])
(struct sscop *, int, int) = {
(struct sscop *, intptr_t, intptr_t) = {
sscop_init_inst, /* SOS_INST */
NULL, /* SOS_IDLE */
NULL, /* SOS_OUTCONN */
@ -87,7 +87,7 @@ static void (*sscop_init_tab[SOS_NUMSTATES])
/* SSCOP_TERM */
static void (*sscop_term_tab[SOS_NUMSTATES])
(struct sscop *, int, int) = {
(struct sscop *, intptr_t, intptr_t) = {
sscop_term_all, /* SOS_INST */
sscop_term_all, /* SOS_IDLE */
sscop_term_all, /* SOS_OUTCONN */
@ -104,7 +104,7 @@ static void (*sscop_term_tab[SOS_NUMSTATES])
/* SSCOP_ESTABLISH_REQ */
static void (*sscop_estreq_tab[SOS_NUMSTATES])
(struct sscop *, int, int) = {
(struct sscop *, intptr_t, intptr_t) = {
NULL, /* SOS_INST */
sscop_estreq_idle, /* SOS_IDLE */
NULL, /* SOS_OUTCONN */
@ -121,7 +121,7 @@ static void (*sscop_estreq_tab[SOS_NUMSTATES])
/* SSCOP_ESTABLISH_RSP */
static void (*sscop_estrsp_tab[SOS_NUMSTATES])
(struct sscop *, int, int) = {
(struct sscop *, intptr_t, intptr_t) = {
NULL, /* SOS_INST */
NULL, /* SOS_IDLE */
NULL, /* SOS_OUTCONN */
@ -138,7 +138,7 @@ static void (*sscop_estrsp_tab[SOS_NUMSTATES])
/* SSCOP_RELEASE_REQ */
static void (*sscop_relreq_tab[SOS_NUMSTATES])
(struct sscop *, int, int) = {
(struct sscop *, intptr_t, intptr_t) = {
NULL, /* SOS_INST */
NULL, /* SOS_IDLE */
sscop_relreq_outconn, /* SOS_OUTCONN */
@ -155,7 +155,7 @@ static void (*sscop_relreq_tab[SOS_NUMSTATES])
/* SSCOP_DATA_REQ */
static void (*sscop_datreq_tab[SOS_NUMSTATES])
(struct sscop *, int, int) = {
(struct sscop *, intptr_t, intptr_t) = {
NULL, /* SOS_INST */
NULL, /* SOS_IDLE */
sscop_datreq_outconn, /* SOS_OUTCONN */
@ -172,7 +172,7 @@ static void (*sscop_datreq_tab[SOS_NUMSTATES])
/* SSCOP_RESYNC_REQ */
static void (*sscop_resreq_tab[SOS_NUMSTATES])
(struct sscop *, int, int) = {
(struct sscop *, intptr_t, intptr_t) = {
NULL, /* SOS_INST */
NULL, /* SOS_IDLE */
NULL, /* SOS_OUTCONN */
@ -189,7 +189,7 @@ static void (*sscop_resreq_tab[SOS_NUMSTATES])
/* SSCOP_RESYNC_RSP */
static void (*sscop_resrsp_tab[SOS_NUMSTATES])
(struct sscop *, int, int) = {
(struct sscop *, intptr_t, intptr_t) = {
NULL, /* SOS_INST */
NULL, /* SOS_IDLE */
NULL, /* SOS_OUTCONN */
@ -206,7 +206,7 @@ static void (*sscop_resrsp_tab[SOS_NUMSTATES])
/* SSCOP_UNITDATA_REQ */
static void (*sscop_udtreq_tab[SOS_NUMSTATES])
(struct sscop *, int, int) = {
(struct sscop *, intptr_t, intptr_t) = {
NULL, /* SOS_INST */
sscop_udtreq_all, /* SOS_IDLE */
sscop_udtreq_all, /* SOS_OUTCONN */
@ -226,7 +226,7 @@ static void (*sscop_udtreq_tab[SOS_NUMSTATES])
* Stack command lookup table
*/
void (*(*sscop_qsaal_aatab[SSCOP_CMD_SIZE]))
(struct sscop *, int, int) = {
(struct sscop *, intptr_t, intptr_t) = {
NULL,
sscop_init_tab,
sscop_term_tab,
@ -281,8 +281,8 @@ void (*(*sscop_qsaal_aatab[SSCOP_CMD_SIZE]))
static void
sscop_estreq_ready(sop, arg1, arg2)
struct sscop *sop;
int arg1;
int arg2;
intptr_t arg1;
intptr_t arg2;
{
/*
@ -355,8 +355,8 @@ sscop_estreq_ready(sop, arg1, arg2)
static void
sscop_datreq_outconn(sop, arg1, arg2)
struct sscop *sop;
int arg1;
int arg2;
intptr_t arg1;
intptr_t arg2;
{
KBuffer *m = (KBuffer *)arg1;
@ -412,8 +412,8 @@ sscop_datreq_outconn(sop, arg1, arg2)
static void
sscop_resreq_ready(sop, arg1, arg2)
struct sscop *sop;
int arg1;
int arg2;
intptr_t arg1;
intptr_t arg2;
{
/*
@ -473,8 +473,8 @@ sscop_resreq_ready(sop, arg1, arg2)
static void
sscop_resrsp_inresyn(sop, arg1, arg2)
struct sscop *sop;
int arg1;
int arg2;
intptr_t arg1;
intptr_t arg2;
{
/*
@ -506,8 +506,8 @@ sscop_resrsp_inresyn(sop, arg1, arg2)
static void
sscop_resrsp_conresyn(sop, arg1, arg2)
struct sscop *sop;
int arg1;
int arg2;
intptr_t arg1;
intptr_t arg2;
{
/*

View File

@ -391,7 +391,7 @@ sscop_bgn_outconn(sop, m, trlr)
sop->so_flags &= ~SOF_REESTAB;
} else {
STACK_CALL(SSCOP_ESTABLISH_CNF, sop->so_upper, sop->so_toku,
sop->so_connvc, (int)m, 0, err);
sop->so_connvc, (intptr_t)m, 0, err);
if (err) {
KB_FREEALL(m);
sscop_abort(sop, "sscop_bgn_outconn: stack memory\n");
@ -482,7 +482,7 @@ sscop_end_outresyn(sop, m, trlr)
* Notify user of connection termination
*/
STACK_CALL(SSCOP_RELEASE_IND, sop->so_upper, sop->so_toku,
sop->so_connvc, (int)m, source, err);
sop->so_connvc, (intptr_t)m, source, err);
if (err) {
KB_FREEALL(m);
sscop_abort(sop, "sscop_end_outresyn: stack memory\n");
@ -611,7 +611,7 @@ sscop_end_ready(sop, m, trlr)
* Notify user of connection termination
*/
STACK_CALL(SSCOP_RELEASE_IND, sop->so_upper, sop->so_toku,
sop->so_connvc, (int)m, source, err);
sop->so_connvc, (intptr_t)m, source, err);
if (err) {
KB_FREEALL(m);
sscop_abort(sop, "sscop_end_ready: stack memory\n");
@ -710,7 +710,7 @@ sscop_rs_outresyn(sop, m, trlr)
* Notify user of resynchronization
*/
STACK_CALL(SSCOP_RESYNC_IND, sop->so_upper, sop->so_toku,
sop->so_connvc, (int)m, 0, err);
sop->so_connvc, (intptr_t)m, 0, err);
if (err) {
KB_FREEALL(m);
sscop_abort(sop, "sscop_rs_outresyn: stack memory\n");
@ -755,7 +755,7 @@ sscop_rs_ready(sop, m, trlr)
* Notify user of resynchronization
*/
STACK_CALL(SSCOP_RESYNC_IND, sop->so_upper, sop->so_toku,
sop->so_connvc, (int)m, 0, err);
sop->so_connvc, (intptr_t)m, 0, err);
if (err) {
KB_FREEALL(m);
sscop_abort(sop, "sscop_rs_ready: stack memory\n");
@ -1019,7 +1019,7 @@ sscop_sd_process(sop, m, trlr, type)
*/
if (ns == sop->so_rcvnext) {
STACK_CALL(SSCOP_DATA_IND, sop->so_upper, sop->so_toku,
sop->so_connvc, (int)m, ns, err);
sop->so_connvc, (intptr_t)m, ns, err);
if (err) {
KB_FREEALL(m);
return;
@ -1063,8 +1063,8 @@ sscop_sd_process(sop, m, trlr, type)
if (sop->so_recv_hd == NULL)
sop->so_recv_tl = NULL;
STACK_CALL(SSCOP_DATA_IND, sop->so_upper, sop->so_toku,
sop->so_connvc, (int)php->ph_buf, php->ph_ns,
err);
sop->so_connvc, (intptr_t)php->ph_buf,
php->ph_ns, err);
if (err) {
/*
* Should never happen, but...

View File

@ -104,16 +104,16 @@ void
sscf_uni_lower(cmd, tok, arg1, arg2)
int cmd;
void *tok;
int arg1;
int arg2;
intptr_t arg1;
intptr_t arg2;
{
struct univcc *uvp = (struct univcc *)tok;
Atm_connvc *cvp = uvp->uv_connvc;
enum sscop_vers vers;
int err;
ATM_DEBUG5("sscf_uni_lower: cmd=0x%x, uvp=%p, ustate=%d, arg1=0x%x, arg2=0x%x\n",
cmd, uvp, uvp->uv_ustate, arg1, arg2);
ATM_DEBUG5("sscf_uni_lower: cmd=0x%x, uvp=%p, ustate=%d, arg1=%p, arg2=%p\n",
cmd, uvp, uvp->uv_ustate, (void *)arg1, (void *)arg2);
switch (cmd) {

View File

@ -83,15 +83,15 @@ void
sscf_uni_upper(cmd, tok, arg1, arg2)
int cmd;
void *tok;
int arg1;
int arg2;
intptr_t arg1;
intptr_t arg2;
{
struct univcc *uvp = (struct univcc *)tok;
Atm_connvc *cvp = uvp->uv_connvc;
int err;
ATM_DEBUG5("sscf_uni_upper: cmd=0x%x, uvp=%p, lstate=%d, arg1=0x%x, arg2=0x%x\n",
cmd, uvp, uvp->uv_lstate, arg1, arg2);
ATM_DEBUG5("sscf_uni_upper: cmd=0x%x, uvp=%p, lstate=%d, arg1=%p, arg2=%p\n",
cmd, uvp, uvp->uv_lstate, (void *)arg1, (void *)arg2);
switch (cmd) {

View File

@ -52,9 +52,9 @@ struct univcc {
void *uv_toku; /* Stack upper layer's token */
void *uv_tokl; /* Stack lower layer's token */
void (*uv_upper) /* Stack upper layer's interface */
(int, void *, int, int);
(int, void *, intptr_t, intptr_t);
void (*uv_lower) /* Stack lower layer's interface */
(int, void *, int, int);
(int, void *, intptr_t, intptr_t);
};
/*
@ -98,10 +98,10 @@ void sscf_uni_abort(struct univcc *, char *);
void sscf_uni_pdu_print(struct univcc *, KBuffer *, char *);
/* sscf_uni_lower.c */
void sscf_uni_lower(int, void *, int, int);
void sscf_uni_lower(int, void *, intptr_t, intptr_t);
/* sscf_uni_upper.c */
void sscf_uni_upper(int, void *, int, int);
void sscf_uni_upper(int, void *, intptr_t, intptr_t);
/*

View File

@ -131,16 +131,16 @@ void
sscop_lower(cmd, tok, arg1, arg2)
int cmd;
void *tok;
int arg1;
int arg2;
intptr_t arg1;
intptr_t arg2;
{
struct sscop *sop = (struct sscop *)tok;
void (**stab)(struct sscop *, int, int);
void (*func)(struct sscop *, int, int);
void (**stab)(struct sscop *, intptr_t, intptr_t);
void (*func)(struct sscop *, intptr_t, intptr_t);
int val;
ATM_DEBUG5("sscop_lower: cmd=0x%x, sop=%p, state=%d, arg1=0x%x, arg2=0x%x\n",
cmd, sop, sop->so_state, arg1, arg2);
ATM_DEBUG5("sscop_lower: cmd=0x%x, sop=%p, state=%d, arg1=%p, arg2=%p\n",
cmd, sop, sop->so_state, (void *)arg1, (void *)arg2);
/*
* Validate stack command
@ -214,8 +214,8 @@ sscop_lower(cmd, tok, arg1, arg2)
void
sscop_aa_noop_0(sop, arg1, arg2)
struct sscop *sop;
int arg1;
int arg2;
intptr_t arg1;
intptr_t arg2;
{
/*
* Nothing to do
@ -239,8 +239,8 @@ sscop_aa_noop_0(sop, arg1, arg2)
void
sscop_aa_noop_1(sop, arg1, arg2)
struct sscop *sop;
int arg1;
int arg2;
intptr_t arg1;
intptr_t arg2;
{
/*
@ -268,8 +268,8 @@ sscop_aa_noop_1(sop, arg1, arg2)
void
sscop_init_inst(sop, arg1, arg2)
struct sscop *sop;
int arg1;
int arg2;
intptr_t arg1;
intptr_t arg2;
{
int err;
@ -330,8 +330,8 @@ sscop_init_inst(sop, arg1, arg2)
void
sscop_term_all(sop, arg1, arg2)
struct sscop *sop;
int arg1;
int arg2;
intptr_t arg1;
intptr_t arg2;
{
int err;

View File

@ -130,7 +130,7 @@ sscop_send_bgn(sop, source)
* Send PDU towards peer
*/
STACK_CALL(CPCS_UNITDATA_INV, sop->so_lower, sop->so_tokl,
sop->so_connvc, (int)m, 0, err);
sop->so_connvc, (intptr_t)m, 0, err);
if (err)
KB_FREEALL(m);
@ -188,7 +188,7 @@ sscop_send_bgak(sop)
* Send PDU towards peer
*/
STACK_CALL(CPCS_UNITDATA_INV, sop->so_lower, sop->so_tokl,
sop->so_connvc, (int)m, 0, err);
sop->so_connvc, (intptr_t)m, 0, err);
if (err)
KB_FREEALL(m);
@ -245,7 +245,7 @@ sscop_send_bgrej(sop)
* Send PDU towards peer
*/
STACK_CALL(CPCS_UNITDATA_INV, sop->so_lower, sop->so_tokl,
sop->so_connvc, (int)m, 0, err);
sop->so_connvc, (intptr_t)m, 0, err);
if (err)
KB_FREEALL(m);
@ -312,7 +312,7 @@ sscop_send_end(sop, source)
* Send PDU towards peer
*/
STACK_CALL(CPCS_UNITDATA_INV, sop->so_lower, sop->so_tokl,
sop->so_connvc, (int)m, 0, err);
sop->so_connvc, (intptr_t)m, 0, err);
if (err)
KB_FREEALL(m);
@ -383,7 +383,7 @@ sscop_send_endak(sop)
* Send PDU towards peer
*/
STACK_CALL(CPCS_UNITDATA_INV, sop->so_lower, sop->so_tokl,
sop->so_connvc, (int)m, 0, err);
sop->so_connvc, (intptr_t)m, 0, err);
if (err)
KB_FREEALL(m);
@ -446,7 +446,7 @@ sscop_send_rs(sop)
* Send PDU towards peer
*/
STACK_CALL(CPCS_UNITDATA_INV, sop->so_lower, sop->so_tokl,
sop->so_connvc, (int)m, 0, err);
sop->so_connvc, (intptr_t)m, 0, err);
if (err)
KB_FREEALL(m);
@ -517,7 +517,7 @@ sscop_send_rsak(sop)
* Send PDU towards peer
*/
STACK_CALL(CPCS_UNITDATA_INV, sop->so_lower, sop->so_tokl,
sop->so_connvc, (int)m, 0, err);
sop->so_connvc, (intptr_t)m, 0, err);
if (err)
KB_FREEALL(m);
@ -574,7 +574,7 @@ sscop_send_er(sop)
* Send PDU towards peer
*/
STACK_CALL(CPCS_UNITDATA_INV, sop->so_lower, sop->so_tokl,
sop->so_connvc, (int)m, 0, err);
sop->so_connvc, (intptr_t)m, 0, err);
if (err)
KB_FREEALL(m);
@ -631,7 +631,7 @@ sscop_send_erak(sop)
* Send PDU towards peer
*/
STACK_CALL(CPCS_UNITDATA_INV, sop->so_lower, sop->so_tokl,
sop->so_connvc, (int)m, 0, err);
sop->so_connvc, (intptr_t)m, 0, err);
if (err)
KB_FREEALL(m);
@ -687,7 +687,7 @@ sscop_send_poll(sop)
* Send PDU towards peer
*/
STACK_CALL(CPCS_UNITDATA_INV, sop->so_lower, sop->so_tokl,
sop->so_connvc, (int)m, 0, err);
sop->so_connvc, (intptr_t)m, 0, err);
if (err)
KB_FREEALL(m);
@ -856,7 +856,7 @@ sscop_stat_end(sop, nps, head, m)
* Finally, send the STAT
*/
STACK_CALL(CPCS_UNITDATA_INV, sop->so_lower, sop->so_tokl,
sop->so_connvc, (int)head, 0, err);
sop->so_connvc, (intptr_t)head, 0, err);
if (err) {
/*
@ -1125,7 +1125,7 @@ sscop_send_ustat(sop, ns)
* Send PDU towards peer
*/
STACK_CALL(CPCS_UNITDATA_INV, sop->so_lower, sop->so_tokl,
sop->so_connvc, (int)m, 0, err);
sop->so_connvc, (intptr_t)m, 0, err);
if (err)
KB_FREEALL(m);
@ -1215,7 +1215,7 @@ sscop_send_ud(sop, m)
* Now pass PDU down the stack
*/
STACK_CALL(CPCS_UNITDATA_INV, sop->so_lower, sop->so_tokl,
sop->so_connvc, (int)m, 0, err);
sop->so_connvc, (intptr_t)m, 0, err);
if (err) {
KB_FREEALL(m);
return (1);

View File

@ -70,8 +70,8 @@ __RCSID("@(#) $FreeBSD$");
void
sscop_estreq_idle(sop, arg1, arg2)
struct sscop *sop;
int arg1;
int arg2;
intptr_t arg1;
intptr_t arg2;
{
/*
@ -137,8 +137,8 @@ sscop_estreq_idle(sop, arg1, arg2)
void
sscop_estrsp_inconn(sop, arg1, arg2)
struct sscop *sop;
int arg1;
int arg2;
intptr_t arg1;
intptr_t arg2;
{
/*
@ -218,8 +218,8 @@ sscop_estrsp_inconn(sop, arg1, arg2)
void
sscop_relreq_outconn(sop, arg1, arg2)
struct sscop *sop;
int arg1;
int arg2;
intptr_t arg1;
intptr_t arg2;
{
/*
@ -279,8 +279,8 @@ sscop_relreq_outconn(sop, arg1, arg2)
void
sscop_relreq_inconn(sop, arg1, arg2)
struct sscop *sop;
int arg1;
int arg2;
intptr_t arg1;
intptr_t arg2;
{
/*
@ -318,8 +318,8 @@ sscop_relreq_inconn(sop, arg1, arg2)
void
sscop_relreq_ready(sop, arg1, arg2)
struct sscop *sop;
int arg1;
int arg2;
intptr_t arg1;
intptr_t arg2;
{
/*
@ -386,8 +386,8 @@ sscop_relreq_ready(sop, arg1, arg2)
void
sscop_datreq_ready(sop, arg1, arg2)
struct sscop *sop;
int arg1;
int arg2;
intptr_t arg1;
intptr_t arg2;
{
KBuffer *m = (KBuffer *)arg1;
@ -433,8 +433,8 @@ sscop_datreq_ready(sop, arg1, arg2)
void
sscop_udtreq_all(sop, arg1, arg2)
struct sscop *sop;
int arg1;
int arg2;
intptr_t arg1;
intptr_t arg2;
{
KBuffer *m = (KBuffer *)arg1;

View File

@ -154,7 +154,7 @@ sscop_bgn_idle(sop, m, trlr)
* Pass connection request up to user
*/
STACK_CALL(SSCOP_ESTABLISH_IND, sop->so_upper, sop->so_toku,
sop->so_connvc, (int)m, source, err);
sop->so_connvc, (intptr_t)m, source, err);
if (err) {
KB_FREEALL(m);
sscop_abort(sop, "stack memory\n");
@ -243,7 +243,7 @@ sscop_bgn_outdisc(sop, m, trlr)
* Tell user about incoming connection
*/
STACK_CALL(SSCOP_ESTABLISH_IND, sop->so_upper, sop->so_toku,
sop->so_connvc, (int)m, source, err);
sop->so_connvc, (intptr_t)m, source, err);
if (err) {
KB_FREEALL(m);
sscop_abort(sop, "stack memory\n");
@ -332,7 +332,7 @@ sscop_bgn_outresyn(sop, m, trlr)
* Now tell user of a "new" incoming connection
*/
STACK_CALL(SSCOP_ESTABLISH_IND, sop->so_upper, sop->so_toku,
sop->so_connvc, (int)m, source, err);
sop->so_connvc, (intptr_t)m, source, err);
if (err) {
KB_FREEALL(m);
sscop_abort(sop, "stack memory\n");
@ -434,7 +434,7 @@ sscop_bgn_inresyn(sop, m, trlr)
* Tell user of incoming connection
*/
STACK_CALL(SSCOP_ESTABLISH_IND, sop->so_upper, sop->so_toku,
sop->so_connvc, (int)m, source, err);
sop->so_connvc, (intptr_t)m, source, err);
if (err) {
KB_FREEALL(m);
sscop_abort(sop, "stack memory\n");
@ -556,7 +556,7 @@ sscop_bgak_outconn(sop, m, trlr)
sop->so_flags &= ~SOF_REESTAB;
} else {
STACK_CALL(SSCOP_ESTABLISH_CNF, sop->so_upper, sop->so_toku,
sop->so_connvc, (int)m, 0, err);
sop->so_connvc, (intptr_t)m, 0, err);
if (err) {
KB_FREEALL(m);
sscop_abort(sop, "stack memory\n");
@ -654,7 +654,8 @@ sscop_bgrej_outconn(sop, m, trlr)
KBuffer *m;
caddr_t trlr;
{
int source, uu, err;
int source, err;
intptr_t uu;
/*
* Stop retransmit timer
@ -672,7 +673,7 @@ sscop_bgrej_outconn(sop, m, trlr)
uu = SSCOP_UU_NULL;
source = SSCOP_SOURCE_SSCOP;
} else {
uu = (int)m;
uu = (intptr_t)m;
source = SSCOP_SOURCE_USER;
}
@ -936,7 +937,7 @@ sscop_end_inconn(sop, m, trlr)
* Notify user of connection termination
*/
STACK_CALL(SSCOP_RELEASE_IND, sop->so_upper, sop->so_toku,
sop->so_connvc, (int)m, source, err);
sop->so_connvc, (intptr_t)m, source, err);
if (err) {
KB_FREEALL(m);
sscop_abort(sop, "stack memory\n");
@ -2290,7 +2291,7 @@ sscop_ud_all(sop, m, trlr)
* Pass data up to user
*/
STACK_CALL(SSCOP_UNITDATA_IND, sop->so_upper, sop->so_toku,
sop->so_connvc, (int)m, 0, err);
sop->so_connvc, (intptr_t)m, 0, err);
if (err)
KB_FREEALL(m);
return;

View File

@ -103,7 +103,7 @@ sscop_stat_getelem(m, pelem)
/*
* Get element from this buffer
*/
if ((int)cp & (sizeof(sscop_seq) - 1))
if ((intptr_t)cp & (sizeof(sscop_seq) - 1))
bcopy(cp, (caddr_t)pelem, sizeof(sscop_seq));
else
*pelem = *(sscop_seq *)cp;
@ -593,7 +593,8 @@ sscop_service_xmit(sop)
* Now pass it down the stack
*/
STACK_CALL(CPCS_UNITDATA_INV, sop->so_lower,
sop->so_tokl, sop->so_connvc, (int)n, 0, err);
sop->so_tokl, sop->so_connvc, (intptr_t)n, 0,
err);
if (err) {
KB_FREEALL(n);
break;
@ -859,7 +860,7 @@ sscop_proc_xmit(sop)
* Now pass copy down the stack
*/
STACK_CALL(CPCS_UNITDATA_INV, sop->so_lower, sop->so_tokl,
sop->so_connvc, (int)n, 0, err);
sop->so_connvc, (intptr_t)n, 0, err);
if (err) {
KB_FREEALL(n);
KB_LEN(ml) -= trlen;

View File

@ -206,8 +206,8 @@ void
sscop_upper(cmd, tok, arg1, arg2)
int cmd;
void *tok;
int arg1;
int arg2;
intptr_t arg1;
intptr_t arg2;
{
struct sscop *sop = (struct sscop *)tok;
void (**ptab)(struct sscop *, KBuffer *, caddr_t);
@ -215,8 +215,8 @@ sscop_upper(cmd, tok, arg1, arg2)
caddr_t trlr;
int type;
ATM_DEBUG5("sscop_upper: cmd=0x%x, sop=%p, state=%d, arg1=0x%x, arg2=0x%x\n",
cmd, sop, sop->so_state, arg1, arg2);
ATM_DEBUG5("sscop_upper: cmd=0x%x, sop=%p, state=%d, arg1=%p, arg2=%p\n",
cmd, sop, sop->so_state, (void *)arg1, (void *)arg2);
switch (cmd) {
@ -347,7 +347,7 @@ sscop_pdu_receive(m, sop, typep)
*/
KB_TAILADJ(ml, -tlen);
KB_DATAEND(ml, cp, caddr_t);
if ((int)cp & PDU_ADDR_MASK) {
if ((intptr_t)cp & PDU_ADDR_MASK) {
/*
* Trailer not aligned in buffer, use local memory
*/

View File

@ -84,9 +84,9 @@ struct sscop {
void *so_toku; /* Stack upper layer's token */
void *so_tokl; /* Stack lower layer's token */
void (*so_upper) /* Stack upper layer's interface */
(int, void *, int, int);
(int, void *, intptr_t, intptr_t);
void (*so_lower) /* Stack lower layer's interface */
(int, void *, int, int);
(int, void *, intptr_t, intptr_t);
u_short so_headout; /* Output buffer headroom */
};
@ -148,11 +148,11 @@ void sscop_maa_error(struct sscop *, int);
void sscop_abort(struct sscop *, char *);
/* sscop_lower.c */
void sscop_lower(int, void *, int, int);
void sscop_aa_noop_0(struct sscop *, int, int);
void sscop_aa_noop_1(struct sscop *, int, int);
void sscop_init_inst(struct sscop *, int, int);
void sscop_term_all(struct sscop *, int, int);
void sscop_lower(int, void *, intptr_t, intptr_t);
void sscop_aa_noop_0(struct sscop *, intptr_t, intptr_t);
void sscop_aa_noop_1(struct sscop *, intptr_t, intptr_t);
void sscop_init_inst(struct sscop *, intptr_t, intptr_t);
void sscop_term_all(struct sscop *, intptr_t, intptr_t);
/* sscop_pdu.c */
int sscop_send_bgn(struct sscop *, int);
@ -171,13 +171,13 @@ int sscop_send_ud(struct sscop *, KBuffer *);
void sscop_pdu_print(struct sscop *, KBuffer *, char *);
/* sscop_sigaa.c */
void sscop_estreq_idle(struct sscop *, int, int);
void sscop_estrsp_inconn(struct sscop *, int, int);
void sscop_relreq_outconn(struct sscop *, int, int);
void sscop_relreq_inconn(struct sscop *, int, int);
void sscop_relreq_ready(struct sscop *, int, int);
void sscop_datreq_ready(struct sscop *, int, int);
void sscop_udtreq_all(struct sscop *, int, int);
void sscop_estreq_idle(struct sscop *, intptr_t, intptr_t);
void sscop_estrsp_inconn(struct sscop *, intptr_t, intptr_t);
void sscop_relreq_outconn(struct sscop *, intptr_t, intptr_t);
void sscop_relreq_inconn(struct sscop *, intptr_t, intptr_t);
void sscop_relreq_ready(struct sscop *, intptr_t, intptr_t);
void sscop_datreq_ready(struct sscop *, intptr_t, intptr_t);
void sscop_udtreq_all(struct sscop *, intptr_t, intptr_t);
/* sscop_sigcpcs.c */
void sscop_noop(struct sscop *, KBuffer *, caddr_t);
@ -239,7 +239,7 @@ void sscop_set_poll(struct sscop *);
void sscop_timeout(struct atm_time *);
/* sscop_upper.c */
void sscop_upper(int, void *, int, int);
void sscop_upper(int, void *, intptr_t, intptr_t);
/* q2110_sigaa.c */
@ -273,9 +273,9 @@ extern struct sscop *sscop_head;
extern struct sscop_stat sscop_stat;
extern struct atm_time sscop_timer;
extern void (*(*sscop_qsaal_aatab[]))
(struct sscop *, int, int);
(struct sscop *, intptr_t, intptr_t);
extern void (*(*sscop_q2110_aatab[]))
(struct sscop *, int, int);
(struct sscop *, intptr_t, intptr_t);
extern void (*(*sscop_qsaal_pdutab[]))
(struct sscop *, KBuffer *, caddr_t);
extern void (*(*sscop_q2110_pdutab[]))

View File

@ -2328,7 +2328,7 @@ usf_dec_ie_ident(usf, ie, tbl)
/*
* Save final destination address
*/
dest = (void *)((int)ie + tbl[i].f_offs);
dest = (void *)((intptr_t)ie + tbl[i].f_offs);
/*
* Get the field value

View File

@ -1538,7 +1538,7 @@ usf_enc_ie_ident(usf, ie, tbl)
/*
* Check whether to send the field
*/
cp = (char *) ((int)ie + tbl[i].f_offs);
cp = (char *) ((intptr_t)ie + tbl[i].f_offs);
if (tbl[i].len == 0) {
if ((*cp == T_NO || *cp == T_ATM_ABSENT))
continue;

View File

@ -56,7 +56,7 @@ struct unisig {
struct siginst us_inst; /* Header */
struct atm_time us_time; /* Timer controls */
void (*us_lower) /* Lower command handler */
(int, void *, int, int);
(int, void *, intptr_t, intptr_t);
Atm_connection *us_conn; /* Signalling connection */
int us_cref; /* Call reference allocation */
u_int us_retry; /* Protocol retry count */