[parrot/parrot] e1d4c0: Fix alarm.c racy sleep_cond with threads

GitHub noreply at github.com
Wed Aug 29 20:52:59 UTC 2012


  Branch: refs/heads/threads
  Home:   https://github.com/parrot/parrot
  Commit: e1d4c06a417e332ba038cfc0d3e0ba23f5195fa6
      https://github.com/parrot/parrot/commit/e1d4c06a417e332ba038cfc0d3e0ba23f5195fa6
  Author: Andy Dougherty <doughera at lafayette.edu>
  Date:   2012-08-29 (Wed, 29 Aug 2012)

  Changed paths:
    M src/alarm.c

  Log Message:
  -----------
  Fix alarm.c racy sleep_cond with threads

I've never really done any threads programming, so I could be quite off
here, but it looks to me as if there's a race condition in src/alarm.c in
the threads branch.  Specifically, Parrot_alarm_init() creates a thread
that checks sleep_cond before it initializes sleep_cond.  (Similar remarks
hold for alarm_lock.)

rurban: This fixed the deadlock in the sleep Timer task, but there
are still race conditions.
See http://lists.parrot.org/pipermail/parrot-dev/2012-August/007163.html





More information about the parrot-commits mailing list