Branch: Tag:

2019-09-06

2019-09-06 09:22:29 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Thread.Condition: Lock conditions to the first Mutex they are used with.

3167:    OB2KEY(key)->mutex_obj = NULL;    co_signal(& mut->condition);    +  if (!c->mutex_obj) { +  /* Lock the condition to the first mutex it is used together with. */ +  c->mutex_obj = mutex_obj; +  add_ref(mutex_obj); +  } +     /* Wait and allow mutex operations */    SWAP_OUT_CURRENT_THREAD();    c->wait_count++;