)]}'
{
  "commit": "b2302cd60b94a6d68a0e18b3f886b82f4b7f22b7",
  "tree": "124f54e9c0b406ad13c48ee8f854609d13e93c7a",
  "parents": [
    "2a439e13bc37311fa24ca79132900f28902a3e3f"
  ],
  "author": {
    "name": "Liu Hao",
    "email": "lh_mouse@126.com",
    "time": "Fri Apr 26 14:09:00 2019 +0800"
  },
  "committer": {
    "name": "Liu Hao",
    "email": "lh_mouse@126.com",
    "time": "Mon May 06 01:10:54 2019 +0800"
  },
  "message": "winpthreads/cond.c: Remove waits for `sema_b` from wait functions.\n\nAll other functions wait for `sema_b` with `waiters_count_lock_` locked.\nThe order of acquisition of these two things must happen in the same order\nin all functions, otherwise deadlocks may happen.\n\nThe obvious fix is to make wait functions wait for the semaphore after\nhaving locked `waiters_count_lock_`. However, before the wait, the critical\nseciton must be unlocked, otherwise all the other threads will be blocked\non signal/broadcast functions. The now consequent wait and signal operations\non the semaphore have no other effect and can be removed.\n\nFrom now on, waiting threads will update `waiters_count_` without attempting\nto lock `sema_b`. If a wait function is called under the protection of the\nexternal mutex, this was unnecessary; otherwise, scheduling behavior might be\nunpredictable, which nevertheless still conforms to POSIX.\n\nSigned-off-by: Liu Hao \u003clh_mouse@126.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "8df395ebf9b16a00e353bd191a371983743028b1",
      "old_mode": 33188,
      "old_path": "mingw-w64-libraries/winpthreads/src/cond.c",
      "new_id": "cd12c8ba6f2f78c32aefd6b9a37620217b961a61",
      "new_mode": 33188,
      "new_path": "mingw-w64-libraries/winpthreads/src/cond.c"
    }
  ]
}
