Print this page
5045 use atomic_{inc,dec}_* instead of atomic_add_*

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/os/clock.c
          +++ new/usr/src/uts/common/os/clock.c
↓ open down ↓ 1974 lines elided ↑ open up ↑
1975 1975           * Regardless of whether or not we actually bring the system down,
1976 1976           * bump the deadman_panics variable.
1977 1977           *
1978 1978           * N.B. deadman_panics is incremented once for each CPU that
1979 1979           * passes through here.  It's expected that all the CPUs will
1980 1980           * detect this condition within one second of each other, so
1981 1981           * when deadman_enabled is off, deadman_panics will
1982 1982           * typically be a multiple of the total number of CPUs in
1983 1983           * the system.
1984 1984           */
1985      -        atomic_add_32(&deadman_panics, 1);
     1985 +        atomic_inc_32(&deadman_panics);
1986 1986  
1987 1987          if (!deadman_enabled) {
1988 1988                  CPU->cpu_deadman_countdown = deadman_seconds;
1989 1989                  return;
1990 1990          }
1991 1991  
1992 1992          /*
1993 1993           * If we're here, we want to bring the system down.
1994 1994           */
1995 1995          panic("deadman: timed out after %d seconds of clock "
↓ open down ↓ 665 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX