Deleted Added
1/*
2 * Common functions for SCSI Interface Modules (SIMs).
3 *
4 * Copyright (c) 1997 Justin T. Gibbs.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 87 unchanged lines hidden (view full) ---

96sim_lock_sleep(void *ident, int flags, const char *wmesg, int timo,
97 sim_lock *lock)
98{
99 int retval;
100
101 if (lock != &sim_mplock) {
102 /* lock should be held already */
103 KKASSERT(lockstatus(lock, curthread) != 0);
104 tsleep_interlock(ident, flags);
105 lockmgr(lock, LK_RELEASE);
106 retval = tsleep(ident, flags | PINTERLOCKED, wmesg, timo);
107 } else {
108 retval = tsleep(ident, flags, wmesg, timo);
109 }
110
111 if (lock != &sim_mplock) {
112 lockmgr(lock, LK_EXCLUSIVE);
113 }
114
115 return (retval);
116}
117
118struct cam_devq *
119cam_simq_alloc(u_int32_t max_sim_transactions)
120{

--- 128 unchanged lines hidden ---