test/performance/odp_scheduling.c
static void parse_args(int argc, char *argv[], test_args_t *args)
{
	int opt;
	int long_index;

	static const struct option longopts[] = {
		{"count", required_argument, NULL, 'c'},
		{"fair", no_argument, NULL, 'f'},
		{"help", no_argument, NULL, 'h'},
		{NULL, 0, NULL, 0}
	};

	static const char *shortopts = "+c:fh";

	args->cpu_count = 1; /* use one worker by default */

	while (1) {
		opt = getopt_long(argc, argv, shortopts, longopts, &long_index);

		if (opt == -1)
			break;	/* No more options */

		switch (opt) {
		case 'f':
			args->fairness = 1;
			break;

		case 'c':
			args->cpu_count = atoi(optarg);
			break;

		case 'h':
			print_usage();
			exit(EXIT_SUCCESS);
			break;

		default:
			break;
		}
	}
}
/**
 * @internal Parse arguments
 *
 * @param argc  Argument count
 * @param argv  Argument vector
 * @param args  Test arguments
 */
@internal Parse arguments
@param argc  Argument count
@param argv  Argument vector
@param args  Test arguments
@internal Parse arguments @param argc Argument count @param argv Argument vector @param args Test arguments
static void parse_args(int argc, char *argv[], test_args_t *args)
{
	int opt;
	int long_index;
	static const struct option longopts[] = {
		{"count", required_argument, NULL, 'c'},
		{"fair", no_argument, NULL, 'f'},
		{"help", no_argument, NULL, 'h'},
		{NULL, 0, NULL, 0}
	};
	static const char *shortopts = "+c:fh";
	args->cpu_count = 1; 
	while (1) {
		opt = getopt_long(argc, argv, shortopts, longopts, &long_index);
		if (opt == -1)
			break;	
		switch (opt) {
		case 'f':
			args->fairness = 1;
			break;
		case 'c':
			args->cpu_count = atoi(optarg);
			break;
		case 'h':
			print_usage();
			exit(EXIT_SUCCESS);
			break;
		default:
			break;
		}
	}
}
static void parse_args ( int argc , char * argv [ ] , test_args_t * args ) { int opt ; int long_index ; static const struct option longopts [ ] = { { " " , required_argument , NULL , ' ' } , { " " , no_argument , NULL , ' ' } , { " " , no_argument , NULL , ' ' } , { NULL , 0 , NULL , 0 } } ; static const char * shortopts = " " ; args -> cpu_count = 1 ; while ( 1 ) { opt = getopt_long ( argc , argv , shortopts , longopts , & long_index ) ; if ( opt == -1 ) break ; switch ( opt ) { case ' ' : args -> fairness = 1 ; break ; case ' ' : args -> cpu_count = atoi ( optarg ) ; break ; case ' ' : print_usage ( ) ; exit ( EXIT_SUCCESS ) ; break ; default : break ; } } }
@internal Parse arguments
 @param argc  Argument count
 @param argv  Argument vector
 @param args  Test arguments
@internal Parse arguments @param argc Argument count @param argv Argument vector @param args Test arguments
/* use one worker by default */ /* No more options */