(file) Return to oi.h CVS log (file) (dir) Up to [OMI] / omi / oi

 1 krisbash 1.1 
 2              #ifndef _oi_h
 3              #define _oi_h
 4              
 5              // The code being instrumented should only include oi.h
 6              
 7              #include <pal/strings.h>
 8              #include <pal/format.h>
 9              
10              PAL_BEGIN_EXTERNC
11              
12              #if defined (_MSC_VER)
13              # define OI_EVENT(format) static
14              #else
15              # define OI_EVENT(format) PAL_INLINE
16              #endif
17              
18              #define OI_SETDEFAULT(setting)
19              
20              typedef struct _OIGUID
21              {
22 krisbash 1.1     unsigned long  Data1;
23                  unsigned short Data2;
24                  unsigned short Data3;
25                  unsigned char  Data4[ 8 ];
26              }
27              OIGUID;
28              
29              /* Documentation from http://msdn.microsoft.com/en-us/library/windows/desktop/aa363720(v=vs.85).aspx */
30              typedef enum _OIActivityControlCode
31              {
32                  /* Sets the ActivityId parameter to the current identifier value from thread local storage. */
33                  OI_CTRL_GET_ID = 1,         
34                  
35                  /* Uses the identifier in the ActivityId parameter to set the value of the current identifier in the thread local storage. */
36                  OI_CTRL_SET_ID,         
37                  
38                  /* Creates a new identifier and sets the ActivityId parameter to the value of the new identifier. */
39                  OI_CTRL_CREATE_ID,      
40                  
41                  /* 
42                      Performs the following:
43 krisbash 1.1         Copies the current identifier from thread local storage.
44                      Sets the current identifier in thread local storage to the identifier specified in the ActivityId parameter.
45                      Sets the ActivityId parameter to the copy of the previous current identifier.
46                  */
47                  OI_CTRL_GET_SET_ID,     
48                  
49                  /* 
50                      Performs the following:
51                      Copies the current identifier from thread local storage.
52                      Creates a new identifier and sets the current identifier in thread local storage to the identifier specified in the ActivityId parameter.
53                      Sets the ActivityId parameter to the copy of the previous current identifier. 
54                  */
55                  OI_CTRL_CREATE_SET_ID
56              } OIActivityControlCode;
57              
58              PAL_INLINE unsigned long OIActivityId(OIActivityControlCode controlcode, OIGUID * activityId);
59              
60              /*
61              trace_EventTransfer
62              
63              activity - optional activity id, may be NULL - current TLS value will be used
64 krisbash 1.1 related - mandatory - related activity id
65              */
66              PAL_INLINE void trace_EventTransfer(OIGUID * activity, OIGUID * related);
67              
68              PAL_END_EXTERNC
69              
70              #endif // _oi_h

ViewCVS 0.9.2