library/src/events/BP-Events.cc
//! Attempts to lookup the keyed entry table for the event workers threads.
Attempts to lookup the keyed entry table for the event workers threads.
Attempts to lookup the keyed entry table for the event workers threads .
P_BP_HASH_TABLE_KEYED_ENTRY BP_EventMgrLookupWorkersTable(P_BP_EVENT_MANAGER event_manager)
{
	BP_EVENTMGR_VALIDATE_WORKING_ENVIRONMENT(NULL);
	if(!event_manager)
		return NULL;
	if(!event_manager->name)
		return NULL;
	BP_GHT_ENTER_CRITICAL_SECTION;
	char * table_path_actual[10] = {0};
	BP_HASH_TABLE_TRAVERSAL_PATH table_path = (char **) &table_path_actual;
	table_path[0] = "system";
	table_path[1] = "event_managment";
	table_path[2] = event_manager->name;
	table_path[3] = "workers";
	P_BP_HASH_TABLE_KEYED_ENTRY workers_table_lookup = BP_HashRegLookupTableByPath(NULL, table_path);
	if(!workers_table_lookup)
		BP_GHT_LEAVE_CRITICAL_SECTION_AND_RETURN_FROM_FUNC(NULL);
	BP_GHT_LEAVE_CRITICAL_SECTION;
	return workers_table_lookup;
}
P_BP_HASH_TABLE_KEYED_ENTRY BP_EventMgrLookupWorkersTable ( P_BP_EVENT_MANAGER event_manager ) { BP_EVENTMGR_VALIDATE_WORKING_ENVIRONMENT ( NULL ) ; if ( ! event_manager ) return NULL ; if ( ! event_manager -> name ) return NULL ; BP_GHT_ENTER_CRITICAL_SECTION ; char * table_path_actual [ 10 ] = { 0 } ; BP_HASH_TABLE_TRAVERSAL_PATH table_path = ( char * * ) & table_path_actual ; table_path [ 0 ] = " " ; table_path [ 1 ] = " " ; table_path [ 2 ] = event_manager -> name ; table_path [ 3 ] = " " ; P_BP_HASH_TABLE_KEYED_ENTRY workers_table_lookup = BP_HashRegLookupTableByPath ( NULL , table_path ) ; if ( ! workers_table_lookup ) BP_GHT_LEAVE_CRITICAL_SECTION_AND_RETURN_FROM_FUNC ( NULL ) ; BP_GHT_LEAVE_CRITICAL_SECTION ; return workers_table_lookup ; }
Attempts to lookup the keyed entry table for the event workers threads.
Attempts to lookup the keyed entry table for the event workers threads .
// ensure we have a correct working environment within the event manager // ensure we have a manager // manager name is necessary for lookup // enter critical section before lookup // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // %%% Attempt to Lookup Workers Table for Manager %%%%%%%% // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // create a table path on the stack for ease of use // reference to the local stack // set path to /system/event_managment/uuid/workers/ // attempt lookup for /system/event_managment/uuid/workers/ // If we can't lookup the workers table, we somehow have a corrupt table.  Return // immediately. // leave the critical section before exiting routine // return the workers table