~vorlon/ubuntu/raring/upstart/lp.1199778

« back to all changes in this revision

Viewing changes to ChangeLog

  • Committer: Scott James Remnant
  • Date: 2007-05-20 12:09:17 UTC
  • Revision ID: scott@netsplit.com-20070520120917-6yanaj1t0a1ej3zd
* init/event.c (event_ref, event_unref): Reference counting of events
so we don't free those we still need.
(event_block, event_unblock): Blocker counting that replaces the
previous jobs member.
(event_new): Initialise refs and blockers fields.
(event_emit_finished): Remove this function.
(event_poll): Handle the new done state, and deal with the blockers
and references counts; turns out that we can fall all the way through
this switch if these are zero without needing to check again.
(event_pending): Remove call to event_emit_finished, the event_poll()
loop handles this case now.
(event_finished): Set progress to done on the way out.
* init/event.h (EventProgress): Add new done state
(Event): Add refs and blockers members, replacing jobs
* init/tests/test_event.c (test_new): Check refs and blockers are
initialised to zero.
(test_ref, test_unref, test_block, test_unblock): Check the ref
counting function behaviours.
(test_emit_finished): Drop this function since it's not used
* init/job.c (job_change_cause): Reference and block the event,
and unblock and unreference before changing.
(job_emit_event): Reference the event that blocks the job from
continuing.
(job_handle_event_finished): Unreference the blocking event again.
(job_change_state): Make sure that blocked has been cleared before
allowing a state change.
* init/tests/test_job.c: Change tests to use refs/blockers on the
cause event when counting, and also to follow the status of blocked
since that is now ref-counted as well.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
2007-05-20  Scott James Remnant  <scott@netsplit.com>
 
2
 
 
3
        * init/event.c (event_ref, event_unref): Reference counting of events
 
4
        so we don't free those we still need.
 
5
        (event_block, event_unblock): Blocker counting that replaces the
 
6
        previous jobs member.
 
7
        (event_new): Initialise refs and blockers fields.
 
8
        (event_emit_finished): Remove this function.
 
9
        (event_poll): Handle the new done state, and deal with the blockers
 
10
        and references counts; turns out that we can fall all the way through
 
11
        this switch if these are zero without needing to check again.
 
12
        (event_pending): Remove call to event_emit_finished, the event_poll()
 
13
        loop handles this case now.
 
14
        (event_finished): Set progress to done on the way out.
 
15
        * init/event.h (EventProgress): Add new done state
 
16
        (Event): Add refs and blockers members, replacing jobs
 
17
        * init/tests/test_event.c (test_new): Check refs and blockers are
 
18
        initialised to zero.
 
19
        (test_ref, test_unref, test_block, test_unblock): Check the ref
 
20
        counting function behaviours.
 
21
        (test_emit_finished): Drop this function since it's not used
 
22
        * init/job.c (job_change_cause): Reference and block the event,
 
23
        and unblock and unreference before changing.
 
24
        (job_emit_event): Reference the event that blocks the job from
 
25
        continuing.
 
26
        (job_handle_event_finished): Unreference the blocking event again.
 
27
        (job_change_state): Make sure that blocked has been cleared before
 
28
        allowing a state change.
 
29
        * init/tests/test_job.c: Change tests to use refs/blockers on the
 
30
        cause event when counting, and also to follow the status of blocked
 
31
        since that is now ref-counted as well.
 
32
 
1
33
2007-05-18  Scott James Remnant  <scott@netsplit.com>
2
34
 
3
35
        * init/main.c (main, cad_handler, kbd_handler, pwr_handler): Use