| 2239 | |
| 2240 | |
| 2241 | bool LockManager::init_owner_block(CheckStatusWrapper* statusVector, own* owner, UCHAR owner_type, |
| 2242 | LOCK_OWNER_T owner_id) |
| 2243 | { |
| 2244 | /************************************** |
| 2245 | * |
| 2246 | * i n i t _ o w n e r _ b l o c k |
| 2247 | * |
| 2248 | ************************************** |
| 2249 | * |
| 2250 | * Functional description |
| 2251 | * Initialize the passed owner block nice and new. |
| 2252 | * |
| 2253 | **************************************/ |
| 2254 | |
| 2255 | owner->own_type = type_own; |
| 2256 | owner->own_owner_type = owner_type; |
| 2257 | owner->own_flags = 0; |
| 2258 | owner->own_count = 1; |
| 2259 | owner->own_owner_id = owner_id; |
| 2260 | owner->own_process = m_processOffset; |
| 2261 | owner->own_thread_id = 0; |
| 2262 | SRQ_INIT(owner->own_lhb_owners); |
| 2263 | SRQ_INIT(owner->own_prc_owners); |
| 2264 | SRQ_INIT(owner->own_requests); |
| 2265 | SRQ_INIT(owner->own_blocks); |
| 2266 | SRQ_INIT(owner->own_pending); |
| 2267 | owner->own_acquire_time = 0; |
| 2268 | owner->own_waits = 0; |
| 2269 | owner->own_ast_count = 0; |
| 2270 | |
| 2271 | if (m_sharedMemory->eventInit(&owner->own_wakeup) != FB_SUCCESS) |
| 2272 | { |
| 2273 | (Arg::StatusVector(statusVector) << Arg::Gds(isc_lockmanerr) << |
| 2274 | Arg::Gds(isc_random) << Arg::Str("owner wakeup event failed initialization")).copyTo(statusVector); |
| 2275 | return false; |
| 2276 | } |
| 2277 | |
| 2278 | return true; |
| 2279 | } |
| 2280 | |
| 2281 | |
| 2282 | bool LockManager::initialize(SharedMemoryBase* sm, bool initializeMemory) |
nothing calls this directly
no test coverage detected