lp:~aejsmith/upstart/profiles

Created by Alex Smith and last modified

Implementation of the profiles spec for Upstart

Get this branch:
bzr branch lp:~aejsmith/upstart/profiles
Only Alex Smith can upload to this branch. If you are Alex Smith please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Alex Smith
Project:
upstart
Status:
Experimental

Recent revisions

696. By Alex Smith

Hmm, it helps to nih_list_init a NihList before using it.

695. By Alex Smith

Merged

694. By Alex Smith

Ported profiles code to new config system (finally :p). This probably doesn't work, so don't try it :-)

693. By Alex Smith

Merged latest changes in main (this code does not work!)

692. By Alex Smith

 * Updated code to use NihHash

691. By Alex Smith

Initial profiles code. Read READ_ME_PROFILES before using

690. By Scott James Remnant (Canonical)

* init/event.c (event_match): Change to accept Event as the first
argument and EventInfo as the second, making it obvious that this
matches a received Event against known EventInfo rather than just
comparing two info structs (since the order matters).
* init/event.h: Update prototype.
* init/tests/test_event.c (test_match): Update test accordingly.
(test_poll): Fix typo.
* init/job.c (job_handle_event): Pass in the event as the first
argument to event_match, rather than its info.
* TODO: Update.

689. By Scott James Remnant (Canonical)

* init/job.c (job_emit_event): Return the event that we emit; don't
bother tracking block status or setting blocked, leave that to the
state loop so things are more obvious.
(job_change_state): Set the blocked flag here for starting and stopping
to the return value of job_emit_event().

688. By Scott James Remnant (Canonical)

* 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.

687. By Scott James Remnant (Canonical)

* init/main.c (main, cad_handler, kbd_handler, pwr_handler): Use
event_new rather than event_emit.
* init/job.h (Job): Change type of cause and blocked to Event
* init/job.c (job_change_goal, job_change_cause, job_emit_event)
(job_handle_event, job_handle_event_finished): Update all references
to EventEmission to use Event instead.
(job_detect_stalled): Call event_new instead of event_emit
(job_run_process): Use the info member of cause, not event member
* init/tests/test_job.c (test_change_goal, test_change_state)
(test_run_process, test_child_reaper, test_handle_event)
(test_handle_event_finished): Update all references to EventEmission
to use Event instead.
(test_detect_stalled): Correct to use right structure types.
* init/process.c (process_setup_environment): Use cause's info member,
rather than event member.
* init/tests/test_process.c (test_spawn): Update to use Event.
* init/notify.h (NotifySubscription): Change member to event
* init/notify.c (notify_subscribe_event)
(notify_subscription_find, notify_job_event, notify_event)
(notify_event_finished): Update functions to use event member and
Event structures.
* init/tests/test_notify.c (test_subscribe_event)
(test_subscription_find, test_job, test_job_event, test_event)
(test_event_finished): Update to use Event instead of EventEmission
* init/control.c (control_event_emit): Update to use event_new.
* init/tests/test_control.c (test_event_emit)
(test_subscribe_events, test_unsubscribe_events): Update to use
Event rather than EventEmission.
* init/event.h: Fix up a few references.
* init/tests/test_event.c (test_new): Remove reference to emission.

This branch contains Public information 
Everyone can see this information.

Subscribers

No subscribers.