src/sys/pm/name/main.c
/**
 * @brief Converts a name into a NoC node number.
 *
 * @param name Target name.
 *
 * @returns Upon successful completion the NoC node number whose name is @p
 * name is returned. Upon failure, a negative error code is returned
 * instead.
 */
@brief Converts a name into a NoC node number.
@param name Target name.

@returns Upon successful completion the NoC node number whose name is @p
name is returned. Upon failure, a negative error code is returned
instead.
@brief Converts a name into a NoC node number . @param name Target name . @returns Upon successful completion the NoC node number whose name is @p name is returned . Upon failure a negative error code is returned instead .
static int do_name_lookup(const char *name)
{
	name_debug("lookup name=%s", name);
	for (int i = 0; i < NANVIX_NODES_NUM; i++)
	{
		if (!ustrcmp(name, names[i].name))
			return (names[i].nodenum);
	}
	return (-ENOENT);
}
static int do_name_lookup ( const char * name ) { name_debug ( " " , name ) ; for ( int i = 0 ; i < NANVIX_NODES_NUM ; i ++ ) { if ( ! ustrcmp ( name , names [ i ] . name ) ) return ( names [ i ] . nodenum ) ; } return ( - ENOENT ) ; }
@brief Converts a name into a NoC node number.
@brief Converts a name into a NoC node number .
/* Search for portal name. */ /* Found. */