MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / create_process

Method create_process

src/jrd/event.cpp:587–639  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

585
586
587void EventManager::create_process()
588{
589/**************************************
590 *
591 * c r e a t e _ p r o c e s s
592 *
593 **************************************
594 *
595 * Functional description
596 * Create process block unless it already exists.
597 *
598 **************************************/
599 acquire_shmem();
600
601 if (m_processOffset)
602 {
603 release_shmem();
604 return;
605 }
606
607 prb* const process = (prb*) alloc_global(type_prb, sizeof(prb), false);
608 process->prb_process_id = PID;
609 insert_tail(&m_sharedMemory->getHeader()->evh_processes, &process->prb_processes);
610 SRQ_INIT(process->prb_sessions);
611
612 if (m_sharedMemory->eventInit(&process->prb_event) != FB_SUCCESS)
613 {
614 release_shmem();
615 (Arg::Gds(isc_random) << "eventInit() failed").raise();
616 }
617
618 m_processOffset = SRQ_REL_PTR(process);
619
620#ifdef HAVE_OBJECT_MAP
621 LocalStatus ls;
622 CheckStatusWrapper localStatus(&ls);
623 m_process = m_sharedMemory->mapObject<prb>(&localStatus, m_processOffset);
624
625 if (!m_process)
626 {
627 release_shmem();
628 status_exception::raise(&localStatus);
629 }
630#else
631 m_process = process;
632#endif
633
634 probe_processes();
635
636 release_shmem();
637
638 m_cleanupSync.run(this);
639}
640
641
642void EventManager::delete_event(evnt* event)

Callers

nothing calls this directly

Calls 6

GdsClass · 0.85
raiseFunction · 0.85
eventInitMethod · 0.80
getHeaderMethod · 0.45
raiseMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected