Man Linux: Main Page and Category List

NAME

       TAU_ENABLE_CONTEXT_EVENT - Enable a context event

SYNOPSIS

       C/C++:

       TAU_ENABLE_CONTEXT_EVENT(TauUserEvent event);

DESCRIPTION

       Enables a context event.

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);
         else
           TAU_ENABLE_CONTEXT_EVENT(event);

         printf("Inside f2: sleeps 2 sec, calls f3\n");

         TAU_CONTEXT_EVENT(event, 232+count);
         sleep(2);
         f3();
         return 0;
       }

SEE ALSO

       TAU_REGISTER_CONTEXT_EVENT(3), TAU_DISABLE_CONTEXT_EVENT(3)

                                  08/31/2005           TAU_ENABLE_CONTEXT_E(3)