Print this page
4477 DTrace should speak JSON
Reviewed by: Bryan Cantrill <bmc@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/common/util/strtolctype.h
          +++ new/usr/src/common/util/strtolctype.h
↓ open down ↓ 30 lines elided ↑ open up ↑
  31   31  #define _COMMON_UTIL_CTYPE_H
  32   32  
  33   33  #ifdef  __cplusplus
  34   34  extern "C" {
  35   35  #endif
  36   36  
  37   37  /*
  38   38   * This header file contains a collection of macros that the strtou?ll?
  39   39   * functions in common/util use to test characters.  What we need is a kernel
  40   40   * version of ctype.h.
       41 + *
       42 + * NOTE: These macros are used within several DTrace probe context functions.
       43 + * They must not be altered to make function calls or perform actions not
       44 + * safe in probe context.
  41   45   */
  42   46  
  43   47  #if     defined(_KERNEL) && !defined(_BOOT)
  44   48  
  45   49  #define isalnum(ch)     (isalpha(ch) || isdigit(ch))
  46   50  #define isalpha(ch)     (isupper(ch) || islower(ch))
  47   51  #define isdigit(ch)     ((ch) >= '0' && (ch) <= '9')
  48   52  #define islower(ch)     ((ch) >= 'a' && (ch) <= 'z')
  49   53  #define isspace(ch)     (((ch) == ' ') || ((ch) == '\r') || ((ch) == '\n') || \
  50   54                          ((ch) == '\t') || ((ch) == '\f'))
↓ open down ↓ 25 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX