Opened 12 years ago
Closed 11 years ago
#557 closed defect (fixed)
fibril_timer_func needs first aid
| Reported by: | Jiri Svoboda | Owned by: | Jiri Svoboda |
|---|---|---|---|
| Priority: | major | Milestone: | 0.6.0 |
| Component: | helenos/lib/c | Version: | mainline |
| Keywords: | Cc: | ||
| Blocker for: | Depends on: | ||
| See also: | #556, #558 |
Description
fibril_timer_func() has serveral issues. In general it thinks the timer state cannot change (or cannot change in some ways) while it's waiting and not holding the timer lock - while the state can actually change arbitrarily. For example, after returning from fibril_condvarwait_timeout() with rc == ETIMEOUT we don't check the state at all.
Change History (3)
comment:1 by , 12 years ago
| Component: | helenos/unspecified → helenos/lib/c |
|---|
comment:2 by , 12 years ago
| See also: | #556 → #556, #558 |
|---|
comment:3 by , 11 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.

Hopefully fixed in changeset:mainline,2129 and changeset:mainline,2130. The fix also adds a termination acknowledgement from the timer fibril. This makes sure that when fibril_timer_destroy() is called, it does not return until the timer fibril actually gets the message and progresses to the point where it will never touch the timer again. This makes it safe to deallocate the timer once fibril_timer_destroy() returns.