Home | History | Annotate | Download | only in daemon
      1 /**
      2  * @file opd_cookie.h
      3  * cookie -> name cache
      4  *
      5  * @remark Copyright 2002, 2005 OProfile authors
      6  * @remark Read the file COPYING
      7  *
      8  * @author John Levon
      9  */
     10 
     11 #ifndef OPD_COOKIE_H
     12 #define OPD_COOKIE_H
     13 
     14 typedef unsigned long long cookie_t;
     15 
     16 #define INVALID_COOKIE ~0LLU
     17 #define NO_COOKIE 0LLU
     18 
     19 /**
     20  * Shift value to remove trailing zero on a dcookie value, 7 is sufficient
     21  * for most architecture
     22  */
     23 #define DCOOKIE_SHIFT 7
     24 
     25 /**
     26  * Return the name of the given dcookie. May return
     27  * NULL on failure.
     28  */
     29 char const * find_cookie(cookie_t cookie);
     30 
     31 /** return true if this cookie should be ignored */
     32 int is_cookie_ignored(cookie_t cookie);
     33 
     34 /** give a textual description of the cookie */
     35 char const * verbose_cookie(cookie_t cookie);
     36 
     37 void cookie_init(void);
     38 
     39 #endif /* OPD_COOKIE_H */
     40