cam_sim.c (dcd5dea96509f6e483861350c9ef1d6a85b44ff6) | cam_sim.c (b3b15d9256cbba94d509d1c8b1c5b2379f03fd26) |
---|---|
1/*- 2 * Common functions for SCSI Interface Modules (SIMs). 3 * 4 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 5 * 6 * Copyright (c) 1997 Justin T. Gibbs. 7 * All rights reserved. 8 * --- 113 unchanged lines hidden (view full) --- 122 sim->max_dev_openings = max_dev_transactions; 123 sim->flags = 0; 124 sim->refcount = 1; 125 sim->devq = queue; 126 sim->mtx = mtx; 127 return (sim); 128} 129 | 1/*- 2 * Common functions for SCSI Interface Modules (SIMs). 3 * 4 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 5 * 6 * Copyright (c) 1997 Justin T. Gibbs. 7 * All rights reserved. 8 * --- 113 unchanged lines hidden (view full) --- 122 sim->max_dev_openings = max_dev_transactions; 123 sim->flags = 0; 124 sim->refcount = 1; 125 sim->devq = queue; 126 sim->mtx = mtx; 127 return (sim); 128} 129 |
130/** 131 * @brief frees up the sim 132 * 133 * Frees up the CAM @c sim and optionally the devq. If a mutex is associated 134 * with the sim, it must be locked on entry. It will remain locked on 135 * return. 136 * 137 * This function will wait for all outstanding reference to the sim to clear 138 * before returning. 139 * 140 * @param sim The sim to free 141 * @param free_devq Free the devq associated with the sim at creation. 142 */ |
|
130void 131cam_sim_free(struct cam_sim *sim, int free_devq) 132{ 133 struct mtx *mtx; 134 int error; 135 136 if (sim->mtx == NULL) { 137 mtx = &cam_sim_free_mtx; --- 65 unchanged lines hidden --- | 143void 144cam_sim_free(struct cam_sim *sim, int free_devq) 145{ 146 struct mtx *mtx; 147 int error; 148 149 if (sim->mtx == NULL) { 150 mtx = &cam_sim_free_mtx; --- 65 unchanged lines hidden --- |