extern caddr_t atp_free_cluster_list;
extern void atp_delete_free_clusters();
struct atp_trans *atp_trans_alloc(atp)
struct atp_state *atp;
{
extern caddr_t atp_free_cluster_list;
extern void atp_delete_free_clusters();
struct atp_trans *atp_trans_alloc(atp)
struct atp_state *atp;
{
if ((m = gbuf_alloc(TRPS_PER_BLK*sizeof(struct atp_trans),PRI_HI)) == 0)
return (struct atp_trans *)0;
bzero(gbuf_rptr(m), TRPS_PER_BLK*sizeof(struct atp_trans));
trp_array = (struct atp_trans *)gbuf_rptr(m);
for (i=0; i < TRPS_PER_BLK-1; i++)
trp_array[i].tr_list.next = (struct atp_trans *)&trp_array[i+1];
if ((m = gbuf_alloc(TRPS_PER_BLK*sizeof(struct atp_trans),PRI_HI)) == 0)
return (struct atp_trans *)0;
bzero(gbuf_rptr(m), TRPS_PER_BLK*sizeof(struct atp_trans));
trp_array = (struct atp_trans *)gbuf_rptr(m);
for (i=0; i < TRPS_PER_BLK-1; i++)
trp_array[i].tr_list.next = (struct atp_trans *)&trp_array[i+1];
ATEVENTINIT(trp->tr_event);
dPrintf(D_M_ATP_LOW, D_L_TRACE,
ATEVENTINIT(trp->tr_event);
dPrintf(D_M_ATP_LOW, D_L_TRACE,
dPrintf(D_M_ATP_LOW, D_L_TRACE,
("atp_rcb_alloc: allocated rcbp 0x%x\n", (u_int) rcbp));
return(rcbp);
dPrintf(D_M_ATP_LOW, D_L_TRACE,
("atp_rcb_alloc: allocated rcbp 0x%x\n", (u_int) rcbp));
return(rcbp);
dPrintf(D_M_ATP_LOW, D_L_TRACE,
("atp_rcb_free: freeing rcbp 0x%x\n", (u_int) rcbp));
dPrintf(D_M_ATP_LOW, D_L_TRACE,
("atp_rcb_free: freeing rcbp 0x%x\n", (u_int) rcbp));
dPrintf(D_M_ATP, D_L_WARNING,
("atp_rcb_free(%d): tid=%d,loc=%d,rem=%d\n",
0, rcbp->rc_tid,
dPrintf(D_M_ATP, D_L_WARNING,
("atp_rcb_free(%d): tid=%d,loc=%d,rem=%d\n",
0, rcbp->rc_tid,