dgaudet     97/11/09 17:50:09

  Modified:    src/test time-sem.c
  Log:
  Uh let's try that YIELD thing once more ... we want to yield in such a way
  that if the mutex is broken then it'll definately show up as an error.
  It's amazing how doing this yield flattens out differences between the
  various options.
  
  Revision  Changes    Path
  1.5       +5 -2      apachen/src/test/time-sem.c
  
  Index: time-sem.c
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/test/time-sem.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- time-sem.c        1997/11/10 01:47:49     1.4
  +++ time-sem.c        1997/11/10 01:50:09     1.5
  @@ -525,10 +525,13 @@
            /* child, do our thing */
            accept_mutex_child_init();
            for (i = 0; i < num_iter; ++i) {
  +             unsigned long tmp;
  +
                accept_mutex_on ();
  -             ++*shared_counter;
  -             accept_mutex_off ();
  +             tmp = *shared_counter;
                YIELD;
  +             *shared_counter = tmp + 1;
  +             accept_mutex_off ();
            }
            exit (0);
        } else if (pid == -1) {
  
  
  

Reply via email to