Changeset View
Changeset View
Standalone View
Standalone View
head/sys/cam/scsi/scsi_da.c
Show First 20 Lines • Show All 1,680 Lines • ▼ Show 20 Lines | da_periph_release_locked(struct cam_periph *periph, da_ref_token token) | ||||
int cnt; | int cnt; | ||||
struct da_softc *softc = periph->softc; | struct da_softc *softc = periph->softc; | ||||
token_sanity(token); | token_sanity(token); | ||||
DA_PERIPH_PRINT(periph, "releasing device (locked) %s (%d)\n", | DA_PERIPH_PRINT(periph, "releasing device (locked) %s (%d)\n", | ||||
da_ref_text[token], token); | da_ref_text[token], token); | ||||
cnt = atomic_fetchadd_int(&softc->ref_flags[token], -1); | cnt = atomic_fetchadd_int(&softc->ref_flags[token], -1); | ||||
if (cnt != 1) | if (cnt != 1) | ||||
panic("Unholding %d with cnt = %d", token, cnt); | panic("releasing (locked) %d with cnt = %d", token, cnt); | ||||
cam_periph_release_locked(periph); | cam_periph_release_locked(periph); | ||||
} | } | ||||
#define cam_periph_hold POISON | #define cam_periph_hold POISON | ||||
#define cam_periph_unhold POISON | #define cam_periph_unhold POISON | ||||
#define cam_periph_acquire POISON | #define cam_periph_acquire POISON | ||||
#define cam_periph_release POISON | #define cam_periph_release POISON | ||||
#define cam_periph_release_locked POISON | #define cam_periph_release_locked POISON | ||||
▲ Show 20 Lines • Show All 4,854 Lines • Show Last 20 Lines |