FreeBSD/sys/geom/sched/g_sched.c
/*
 * Rebuild the list of scheduler names.
 * To be called with me.gs_mtx lock held.
 */
Rebuild the list of scheduler names.
To be called with me.gs_mtx lock held.
Rebuild the list of scheduler names . To be called with me . gs_mtx lock held .
static void
g_gsched_build_names(struct g_gsched *gsp)
{
	int pos, l;
	struct g_gsched *cur;
	pos = 0;
	LIST_FOREACH(cur, &me.gs_scheds, glist) {
		l = strlen(cur->gs_name);
		if (l + pos + 1 + 1 < sizeof(me.gs_names)) {
			if (pos != 0)
				me.gs_names[pos++] = ' ';
			strcpy(me.gs_names + pos, cur->gs_name);
			pos += l;
		}
	}
	me.gs_names[pos] = '\0';
}
static void g_gsched_build_names ( struct g_gsched * gsp ) { int pos , l ; struct g_gsched * cur ; pos = 0 ; LIST_FOREACH ( cur , & me . gs_scheds , glist ) { l = strlen ( cur -> gs_name ) ; if ( l + pos + 1 + 1 < sizeof ( me . gs_names ) ) { if ( pos != 0 ) me . gs_names [ pos ++ ] = ' ' ; strcpy ( me . gs_names + pos , cur -> gs_name ) ; pos += l ; } } me . gs_names [ pos ] = ' \0 ' ; }
Rebuild the list of scheduler names.
Rebuild the list of scheduler names .