kernel/sys/process.c
/**
 * @brief Determines if a process is alive and valid.
 *
 * Scans @ref process_list to see if @p process is a valid
 * process object or not.
 *
 * XXX This is horribly inefficient, and its very existence
 *     is likely indicative of bugs whereever it needed to
 *     be called...
 *
 * @param process Process object to check.
 * @returns 1 if the process is valid, 0 if it is not.
 */
@brief Determines if a process is alive and valid.
Scans @ref process_list to see if @p process is a valid
process object or not.

XXX This is horribly inefficient, and its very existence
is likely indicative of bugs whereever it needed to
be called

@param process Process object to check.
@returns 1 if the process is valid, 0 if it is not.
@brief Determines if a process is alive and valid . Scans @ref process_list to see if @p process is a valid process object or not . XXX This is horribly inefficient and its very existence is likely indicative of bugs whereever it needed to be called @param process Process object to check . @returns 1 if the process is valid 0 if it is not .
int is_valid_process(process_t * process) {
	foreach(lnode, process_list) {
		if (lnode->value == process) {
			return 1;
		}
	}
	return 0;
}
int is_valid_process ( process_t * process ) { foreach ( lnode , process_list ) { if ( lnode -> value == process ) { return 1 ; } } return 0 ; }
@brief Determines if a process is alive and valid.
@brief Determines if a process is alive and valid .