Branch: Tag:

2001-09-27

2001-09-27 15:36:20 by Martin Stjernholm <mast@lysator.liu.se>

Fixed the swapped flags 1 and 2 to the nonthreaded simulation of Mutex.lock.

Rev: lib/modules/Thread.pmod:1.30

653:    if (locks) error ("Recursive mutex locks.\n");    break;    case 1: -  break; -  case 2: +     if (locks)    // To be really accurate we should hang now, but somehow    // that doesn't seem too useful.    error ("Deadlock detected.\n"); -  +  break; +  case 2: +  if (locks) { +  locks++; +  return 0;    } -  +  }    locks++;    return MutexKey (dec_locks);    }