From 25447294d551bb93f63dd7e43e19b65e7c89e4db Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 25 Aug 2010 11:17:13 +0100 Subject: [process] Add process_running() Signed-off-by: Michael Brown --- src/include/ipxe/process.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/include/ipxe') 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" ) -- cgit v1.2.3-55-g7522