diff options
| author | Michael Brown | 2010-08-25 12:17:13 +0200 |
|---|---|---|
| committer | Michael Brown | 2010-09-03 22:26:21 +0200 |
| commit | 25447294d551bb93f63dd7e43e19b65e7c89e4db (patch) | |
| tree | 48882229bf476266614ed1fb885a37801667662c /src/include/ipxe | |
| parent | [tables] Add table_index() (diff) | |
| download | ipxe-25447294d551bb93f63dd7e43e19b65e7c89e4db.tar.gz ipxe-25447294d551bb93f63dd7e43e19b65e7c89e4db.tar.xz ipxe-25447294d551bb93f63dd7e43e19b65e7c89e4db.zip | |
[process] Add process_running()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe')
| -rw-r--r-- | src/include/ipxe/process.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/include/ipxe/process.h b/src/include/ipxe/process.h index 7cd5b91ac..45c2af639 100644 --- a/src/include/ipxe/process.h +++ b/src/include/ipxe/process.h @@ -66,6 +66,17 @@ process_init ( struct process *process, process_add ( process ); } +/** + * Check if process is running + * + * @v process Process + * @ret running Process is running + */ +static inline __attribute__ (( always_inline )) int +process_running ( struct process *process ) { + return ( ! list_empty ( &process->list ) ); +} + /** Permanent process table */ #define PERMANENT_PROCESSES __table ( struct process, "processes" ) |
