43c43
< __FBSDID("$FreeBSD: head/sys/security/mac/mac_pipe.c 118308 2003-08-01 15:45:14Z rwatson $");
---
> __FBSDID("$FreeBSD: head/sys/security/mac/mac_pipe.c 119184 2003-08-20 19:16:49Z rwatson $");
205a206,208
> #define MAC_DEBUG_COUNTER_INC(x) atomic_add_int(x, 1);
> #define MAC_DEBUG_COUNTER_DEC(x) atomic_subtract_int(x, 1);
>
229a233,235
> #else
> #define MAC_DEBUG_COUNTER_INC(x)
> #define MAC_DEBUG_COUNTER_DEC(x)
776,778c782
< #ifdef MAC_DEBUG
< atomic_add_int(&nmacbpfdescs, 1);
< #endif
---
> MAC_DEBUG_COUNTER_INC(&nmacbpfdescs);
787,789c791
< #ifdef MAC_DEBUG
< atomic_add_int(&nmaccreds, 1);
< #endif
---
> MAC_DEBUG_COUNTER_INC(&nmaccreds);
805,807c807
< #ifdef MAC_DEBUG
< atomic_add_int(&nmacdevfsdirents, 1);
< #endif
---
> MAC_DEBUG_COUNTER_INC(&nmacdevfsdirents);
816,818c816
< #ifdef MAC_DEBUG
< atomic_add_int(&nmacifnets, 1);
< #endif
---
> MAC_DEBUG_COUNTER_INC(&nmacifnets);
838a837,838
> } else {
> MAC_DEBUG_COUNTER_INC(&nmacipqs);
840,843d839
< #ifdef MAC_DEBUG
< if (error == 0)
< atomic_add_int(&nmacipqs, 1);
< #endif
859a856,857
> } else {
> MAC_DEBUG_COUNTER_INC(&nmacmbufs);
861,864d858
< #ifdef MAC_DEBUG
< if (error == 0)
< atomic_add_int(&nmacmbufs, 1);
< #endif
905,907c899
< #ifdef MAC_DEBUG
< atomic_add_int(&nmacmounts, 1);
< #endif
---
> MAC_DEBUG_COUNTER_INC(&nmacmounts);
916,918c908
< #ifdef MAC_DEBUG
< atomic_add_int(&nmacpipes, 1);
< #endif
---
> MAC_DEBUG_COUNTER_INC(&nmacpipes);
938,940c928
< #ifdef MAC_DEBUG
< atomic_add_int(&nmacprocs, 1);
< #endif
---
> MAC_DEBUG_COUNTER_INC(&nmacprocs);
953a942,943
> } else {
> MAC_DEBUG_COUNTER_INC(&nmacsockets);
956,960d945
< #ifdef MAC_DEBUG
< if (error == 0)
< atomic_add_int(&nmacsockets, 1);
< #endif
<
1002,1004c987
< #ifdef MAC_DEBUG
< atomic_add_int(&nmacvnodes, 1);
< #endif
---
> MAC_DEBUG_COUNTER_INC(&nmacvnodes);
1020,1022c1003
< #ifdef MAC_DEBUG
< atomic_subtract_int(&nmacbpfdescs, 1);
< #endif
---
> MAC_DEBUG_COUNTER_DEC(&nmacbpfdescs);
1031,1033c1012
< #ifdef MAC_DEBUG
< atomic_subtract_int(&nmaccreds, 1);
< #endif
---
> MAC_DEBUG_COUNTER_DEC(&nmaccreds);
1049,1051c1028
< #ifdef MAC_DEBUG
< atomic_subtract_int(&nmacdevfsdirents, 1);
< #endif
---
> MAC_DEBUG_COUNTER_DEC(&nmacdevfsdirents);
1060,1062c1037
< #ifdef MAC_DEBUG
< atomic_subtract_int(&nmacifnets, 1);
< #endif
---
> MAC_DEBUG_COUNTER_DEC(&nmacifnets);
1078,1080c1053
< #ifdef MAC_DEBUG
< atomic_subtract_int(&nmacipqs, 1);
< #endif
---
> MAC_DEBUG_COUNTER_DEC(&nmacipqs);
1092,1094c1065
< #ifdef MAC_DEBUG
< atomic_subtract_int(&nmacmbufs, 1);
< #endif
---
> MAC_DEBUG_COUNTER_DEC(&nmacmbufs);
1105,1107c1076
< #ifdef MAC_DEBUG
< atomic_subtract_int(&nmacmounts, 1);
< #endif
---
> MAC_DEBUG_COUNTER_DEC(&nmacmounts);
1116,1118c1085
< #ifdef MAC_DEBUG
< atomic_subtract_int(&nmacpipes, 1);
< #endif
---
> MAC_DEBUG_COUNTER_DEC(&nmacpipes);
1135,1137c1102
< #ifdef MAC_DEBUG
< atomic_subtract_int(&nmacprocs, 1);
< #endif
---
> MAC_DEBUG_COUNTER_DEC(&nmacprocs);
1146,1148c1111
< #ifdef MAC_DEBUG
< atomic_subtract_int(&nmacsockets, 1);
< #endif
---
> MAC_DEBUG_COUNTER_DEC(&nmacsockets);
1173,1175c1136
< #ifdef MAC_DEBUG
< atomic_subtract_int(&nmacvnodes, 1);
< #endif
---
> MAC_DEBUG_COUNTER_DEC(&nmacvnodes);
< __FBSDID("$FreeBSD: head/sys/security/mac/mac_pipe.c 118308 2003-08-01 15:45:14Z rwatson $");
---
> __FBSDID("$FreeBSD: head/sys/security/mac/mac_pipe.c 119184 2003-08-20 19:16:49Z rwatson $");
205a206,208
> #define MAC_DEBUG_COUNTER_INC(x) atomic_add_int(x, 1);
> #define MAC_DEBUG_COUNTER_DEC(x) atomic_subtract_int(x, 1);
>
229a233,235
> #else
> #define MAC_DEBUG_COUNTER_INC(x)
> #define MAC_DEBUG_COUNTER_DEC(x)
776,778c782
< #ifdef MAC_DEBUG
< atomic_add_int(&nmacbpfdescs, 1);
< #endif
---
> MAC_DEBUG_COUNTER_INC(&nmacbpfdescs);
787,789c791
< #ifdef MAC_DEBUG
< atomic_add_int(&nmaccreds, 1);
< #endif
---
> MAC_DEBUG_COUNTER_INC(&nmaccreds);
805,807c807
< #ifdef MAC_DEBUG
< atomic_add_int(&nmacdevfsdirents, 1);
< #endif
---
> MAC_DEBUG_COUNTER_INC(&nmacdevfsdirents);
816,818c816
< #ifdef MAC_DEBUG
< atomic_add_int(&nmacifnets, 1);
< #endif
---
> MAC_DEBUG_COUNTER_INC(&nmacifnets);
838a837,838
> } else {
> MAC_DEBUG_COUNTER_INC(&nmacipqs);
840,843d839
< #ifdef MAC_DEBUG
< if (error == 0)
< atomic_add_int(&nmacipqs, 1);
< #endif
859a856,857
> } else {
> MAC_DEBUG_COUNTER_INC(&nmacmbufs);
861,864d858
< #ifdef MAC_DEBUG
< if (error == 0)
< atomic_add_int(&nmacmbufs, 1);
< #endif
905,907c899
< #ifdef MAC_DEBUG
< atomic_add_int(&nmacmounts, 1);
< #endif
---
> MAC_DEBUG_COUNTER_INC(&nmacmounts);
916,918c908
< #ifdef MAC_DEBUG
< atomic_add_int(&nmacpipes, 1);
< #endif
---
> MAC_DEBUG_COUNTER_INC(&nmacpipes);
938,940c928
< #ifdef MAC_DEBUG
< atomic_add_int(&nmacprocs, 1);
< #endif
---
> MAC_DEBUG_COUNTER_INC(&nmacprocs);
953a942,943
> } else {
> MAC_DEBUG_COUNTER_INC(&nmacsockets);
956,960d945
< #ifdef MAC_DEBUG
< if (error == 0)
< atomic_add_int(&nmacsockets, 1);
< #endif
<
1002,1004c987
< #ifdef MAC_DEBUG
< atomic_add_int(&nmacvnodes, 1);
< #endif
---
> MAC_DEBUG_COUNTER_INC(&nmacvnodes);
1020,1022c1003
< #ifdef MAC_DEBUG
< atomic_subtract_int(&nmacbpfdescs, 1);
< #endif
---
> MAC_DEBUG_COUNTER_DEC(&nmacbpfdescs);
1031,1033c1012
< #ifdef MAC_DEBUG
< atomic_subtract_int(&nmaccreds, 1);
< #endif
---
> MAC_DEBUG_COUNTER_DEC(&nmaccreds);
1049,1051c1028
< #ifdef MAC_DEBUG
< atomic_subtract_int(&nmacdevfsdirents, 1);
< #endif
---
> MAC_DEBUG_COUNTER_DEC(&nmacdevfsdirents);
1060,1062c1037
< #ifdef MAC_DEBUG
< atomic_subtract_int(&nmacifnets, 1);
< #endif
---
> MAC_DEBUG_COUNTER_DEC(&nmacifnets);
1078,1080c1053
< #ifdef MAC_DEBUG
< atomic_subtract_int(&nmacipqs, 1);
< #endif
---
> MAC_DEBUG_COUNTER_DEC(&nmacipqs);
1092,1094c1065
< #ifdef MAC_DEBUG
< atomic_subtract_int(&nmacmbufs, 1);
< #endif
---
> MAC_DEBUG_COUNTER_DEC(&nmacmbufs);
1105,1107c1076
< #ifdef MAC_DEBUG
< atomic_subtract_int(&nmacmounts, 1);
< #endif
---
> MAC_DEBUG_COUNTER_DEC(&nmacmounts);
1116,1118c1085
< #ifdef MAC_DEBUG
< atomic_subtract_int(&nmacpipes, 1);
< #endif
---
> MAC_DEBUG_COUNTER_DEC(&nmacpipes);
1135,1137c1102
< #ifdef MAC_DEBUG
< atomic_subtract_int(&nmacprocs, 1);
< #endif
---
> MAC_DEBUG_COUNTER_DEC(&nmacprocs);
1146,1148c1111
< #ifdef MAC_DEBUG
< atomic_subtract_int(&nmacsockets, 1);
< #endif
---
> MAC_DEBUG_COUNTER_DEC(&nmacsockets);
1173,1175c1136
< #ifdef MAC_DEBUG
< atomic_subtract_int(&nmacvnodes, 1);
< #endif
---
> MAC_DEBUG_COUNTER_DEC(&nmacvnodes);