Beispiel #1
0
void omp_unset_lock (int *p1)
{
#if defined(DEBUG)
	fprintf (stderr, PACKAGE_NAME": omp_unset_lock is at %p\n", omp_unset_lock_real);
	fprintf (stderr, PACKAGE_NAME": omp_unset_lock params %p\n", p1);
#endif

	if (omp_unset_lock_real != NULL && EXTRAE_INITIALIZED())
	{
		Backend_Enter_Instrumentation (2);
		Probe_OpenMP_Named_Unlock_Entry(p1);
		omp_unset_lock_real (p1);
		Probe_OpenMP_Named_Unlock_Exit();
		Backend_Leave_Instrumentation ();
	}
	else if (omp_unset_lock_real != NULL)
	{
		omp_unset_lock_real (p1);
	}
	else
	{
		fprintf (stderr, PACKAGE_NAME": omp_unset_lock is not hooked! exiting!!\n");
		exit (0);
	}
}
Beispiel #2
0
void omp_unset_lock (int *p1)
{
	Record_Event Event = Event_init ();
	Event.event_name = "omp_unset_lock";
	Event.eid = 231;
	Event.type = NONE;
	Event.omp_rank = get_thread_num ();
	Event.omp_level = get_level ();
	Event.p_rank = omp_get_ancestor_thread_num (get_level () - 1);

	omp_unset_lock_real = (void(*)(int*)) dlsym (RTLD_NEXT, "omp_unset_lock");
	if(omp_unset_lock_real!= NULL)
	{
		Event.starttime = gettime ();
		omp_unset_lock_real (p1);
		Event.endtime = gettime ();
		Record (&Event, OMPI_TRACE);
	}
	else
	{
		printf_d ("omp_unset_lock is not hooked! exiting!!\n");
	}
}