4 volatile int in_critical_section = 0;
8 if (in_critical_section) {
18 in_critical_section = 1;
22 while (count1 != count2) {
26 in_critical_section = 0;
28 while (count1 != count2) {
29 /* here we have to block signals, but we expect it almost never to
30 * happen. it will only happen if a signal arrives between the
31 * end of the first while loop and the unsetting of the
32 * in_critical_section flag, which should be so rare that the
33 * performance hit will be tiny