Branch: Tag:

2004-04-21

2004-04-21 19:27:53 by Martin Stjernholm <mast@lysator.liu.se>

Test destruction of mutexes that are being waited on.

Rev: lib/modules/testsuite.in:1.27

1: - dnl $Id: testsuite.in,v 1.26 2004/04/06 13:25:56 nilsson Exp $ + dnl $Id: testsuite.in,v 1.27 2004/04/21 19:27:53 mast Exp $      dnl - Array   
802:   ]], ({}))   ]])    + cond([[all_constants()->thread_create]], + [[ +  test_any([[ +  int num_ok = 0; +  +  Thread.Mutex m = Thread.Mutex(); +  Thread.MutexKey l = m->lock(); +  +  void thread_fn () +  { +  m->lock(); +  num_ok++; +  }; +  +  array(Thread.Thread) t = (({Thread.thread_create}) * 5) (thread_fn); +  +  sleep (0.5); // Make sure they are waiting for the lock. +  destruct (m); +  sleep (0.5); // Wait for them to finish. +  +  return num_ok; +  ]], 5) + ]]) +    dnl - This test is disabled for now.   cond([[ 0 && __builtin->TraceProcess && (cpp("__NT__")/"\n")[1]=="__NT__" ]],   [[