Print this page
5045 use atomic_{inc,dec}_* instead of atomic_add_*
*** 411,421 ****
if ((mp->b_cont != NULL) &&
(mp->b_cont->b_datap->db_type == M_DATA)) {
mp = mp->b_cont; /* jump over the M_CTL into M_DATA */
} else {
ipgpc0dbg(("ipgpc_invoke_action: no data\n"));
! atomic_add_64(&ipgpc_epackets, 1);
return (EINVAL);
}
}
/*
--- 411,421 ----
if ((mp->b_cont != NULL) &&
(mp->b_cont->b_datap->db_type == M_DATA)) {
mp = mp->b_cont; /* jump over the M_CTL into M_DATA */
} else {
ipgpc0dbg(("ipgpc_invoke_action: no data\n"));
! atomic_inc_64(&ipgpc_epackets);
return (EINVAL);
}
}
/*
*** 483,503 ****
end = gethrtime(); /* stop timer */
}
/* ipgpc_classify will only return NULL if a memory error occured */
if (out_class == NULL) {
! atomic_add_64(&ipgpc_epackets, 1);
return (ENOMEM);
}
ipgpc1dbg(("ipgpc_invoke_action: class = %s", out_class->class_name));
/* print time to classify(..) */
ipgpc2dbg(("ipgpc_invoke_action: time = %lld nsec\n", (end - start)));
if ((rc = ipp_packet_add_class(packet, out_class->class_name,
out_class->next_action)) != 0) {
! atomic_add_64(&ipgpc_epackets, 1);
ipgpc0dbg(("ipgpc_invoke_action: ipp_packet_add_class " \
"failed with error %d", rc));
return (rc);
}
return (ipp_packet_next(packet, IPP_ACTION_CONT));
--- 483,503 ----
end = gethrtime(); /* stop timer */
}
/* ipgpc_classify will only return NULL if a memory error occured */
if (out_class == NULL) {
! atomic_inc_64(&ipgpc_epackets);
return (ENOMEM);
}
ipgpc1dbg(("ipgpc_invoke_action: class = %s", out_class->class_name));
/* print time to classify(..) */
ipgpc2dbg(("ipgpc_invoke_action: time = %lld nsec\n", (end - start)));
if ((rc = ipp_packet_add_class(packet, out_class->class_name,
out_class->next_action)) != 0) {
! atomic_inc_64(&ipgpc_epackets);
ipgpc0dbg(("ipgpc_invoke_action: ipp_packet_add_class " \
"failed with error %d", rc));
return (rc);
}
return (ipp_packet_next(packet, IPP_ACTION_CONT));