diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2013-08-12 15:57:41 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2013-08-19 13:27:59 +0800 |
commit | e52a8c61a640ab4fce0b4caaa796ae3e1c4ff8a3 (patch) | |
tree | 2256e91d0b24e068531361a8b0793cd2be3832fc /lib/Makefile.am | |
parent | e25ee629c6dfa47c13121cc70b2da1b2dd21036c (diff) | |
download | petitboot-e52a8c61a640ab4fce0b4caaa796ae3e1c4ff8a3.zip petitboot-e52a8c61a640ab4fce0b4caaa796ae3e1c4ff8a3.tar.gz |
lib/process: Add process helpers
We've grown-out of pb_run_cmd a little, as we have a number of different
process types:
boot():
- kexec: short-running process, run synchronously
- boot hooks: short-running, run sync, need exit code & stdout
network init:
- interface configuration: short running, run sync
- udhcp processes are long running, we may want completion, but
doesn't block other actions
downloads:
- potentially long-running, block parse progress
config nvram:
- read: short running, can block, need stdout
- write: short running, can block
We'd like to introduce proper asynchronous processes, to allow config &
boot-option downloads without blocking the discover server.
This change introduces a new type for processes, 'struct process'. These
structures are created with process_create, and run with
process_run_sync or process_run_async. The latter reports completion
through a callback member of struct process.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'lib/Makefile.am')
-rw-r--r-- | lib/Makefile.am | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am index fb25147..f000a2f 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -34,6 +34,8 @@ libpbcore_la_SOURCES = \ pb-config/storage-powerpc-nvram.c \ pb-config/storage-null.c \ pb-config/storage-test.c \ + process/process.c \ + process/process.h \ types/types.h \ talloc/talloc.c \ talloc/talloc.h \ |