Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tau_context_event(3) [debian man page]

TAU_CONTEXT_EVENT(3)					      TAU Instrumentation API					      TAU_CONTEXT_EVENT(3)

NAME
TAU_CONTEXT_EVENT - Triggers a context event SYNOPSIS
C/C++: TAU_CONTEXT_EVENT(TauUserEvent variable, double value); Fortran: TAU_CONTEXT_EVENT(integer variable(2), real value); DESCRIPTION
Triggers a context event. A context event associates the name with the list of routines along the callstack. A context event tracks information like a user defined event and TAU records the maxima, minima, mean, std. deviation and the number of samples for each context event. A context event helps distinguish the data supplied by the user based on the location where an event occurs and the sequence of actions (routine/timer invocations) that preceeded the event. The depth of the the callstack embedded in the context event's name is specified by the user in the environment variable TAU_CALLPATH_DEPTH. If this variable is not specified, TAU uses a default depth of 2. EXAMPLE
C/C++ : int f2(void) { static int count = 0; count ++; TAU_PROFILE("f2()", "(sleeps 2 sec, calls f3)", TAU_USER); TAU_REGISTER_CONTEXT_EVENT(event, "Iteration count"); /* if (count == 2) TAU_DISABLE_CONTEXT_EVENT(event); */ printf("Inside f2: sleeps 2 sec, calls f3 "); TAU_CONTEXT_EVENT(event, 232+count); sleep(2); f3(); return 0; } Fortran : integer memevent(2) / 0, 0 / save memevent call TAU_REGISTER_CONTEXT_EVENT(memevent, "STORAGEARY mem allocated') call TAU_CONTEXT_EVENT(memevent, SIZEOF(STORAGEARY)*sizeof(INTEGER)) SEE ALSO
TAU_REGISTER_CONTEXT_EVENT(3) 08/31/2005 TAU_CONTEXT_EVENT(3)

Check Out this Related Man Page

XtAppPeekEvent()														  XtAppPeekEvent()

Name
  XtAppPeekEvent - return, but do not remove the event at the head of an application's input queue; block if no events are available.

Synopsis
  Boolean XtAppPeekEvent(app_context, event_return)
	 XtAppContext app_context;
	 XEvent *event_return;

Inputs
  app_context
	    Specifies the application context.

Outputs
  event_return
	    Returns the event from the head of the queue, if that event is an X event.

Returns
  True if the event at the head of the queue is an X event; False if it is a timer event or an alternate input source event.

Description
  If  there  are  X  events pending on any of the displays in app_context, XtAppPeekEvent() copies the event from the head of the application
  event queue into event_return (without removing the event from the queue) and returns True.  If there are no events, it flushes the  output
  buffers  of each display and checks again.  If there are still no pending X events on any of the displays, but there are timer or alternate
  input events ready, XtAppPeekEvent() returns False.

  If there are no events of any kind, XtAppPeekEvent() blocks until one occurs, and then if it is an  X  event,  copies  the  event  (without
  removing it from the queue) and returns True or returns False otherwise.  Note that XtAppPeekEvent() never calls background work procedures
  registered with XtAppAddWorkProc() .

Usage
  Programs rarely need this much control over the event dispatching mechanism.	Most programs use XtAppMainLoop().

  If you want to get X events and remove them from the input queue, consider XtAppNextEvent().	 This  function  also  dispatches  timer  and
  alternate input events.

  If  you  want  to check for input events without blocking, use XtAppPending().  This function returns a value that indicates which types of
  events are pending for an application context, or 0 if no events are pending.

See Also
  XtAppMainLoop(1), XtAppNextEvent(1), XtAppPending(1).

Xt - Event Handling														  XtAppPeekEvent()
Man Page

2 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with setting a variable!

I am working within a while loop and i am trying to set a variable that will read out each count of the files. the problem is the count variable i have set up gives me a total and not the individual count of each file. in the data area there is 4 abc.dat and 1 def.dat. how can i do this??? ... (2 Replies)
Discussion started by: Pablo_beezo
2 Replies

2. Shell Programming and Scripting

Using a variable within a variable name

Hello all, I am currently trying to over-complicate things by doing something similar to the code below: count=1 for x in $(cat /etc/filename); do file_$count=$(echo $variable| awk '{print $1}') count=$(( $count + 1 )) done What I expected was different variable names file_1 file_2 .... (1 Reply)
Discussion started by: Khoomfire
1 Replies