void
PyTuple_Fini(void)
{
#if PyTuple_MAXSAVESIZE > 0
    /* empty tuples are used all over the place and applications may
     * rely on the fact that an empty tuple is a singleton. */
    Py_CLEAR(free_list[0]);

    (void)PyTuple_ClearFreeList();
#endif
#ifdef SHOW_TRACK_COUNT
    show_track();
#endif
}
Example #2
0
int main(int argc, char** argv)
{
	if (argc != 2) {
		printf("Uso: ep1 <arquivo_de_entrada>\n");
		return EXIT_FAILURE;
	}
	
	srand(time(NULL));

	setup_track();		
	setup_boxes();

	if (read_input_file(argv[1])) {	
		create_track_mutexes();		
		create_boxes_mutexes();
		setup_pilots();
		choose_reduced_pilots();
		setup_start_grid();
		if (DEBUG) show_pilots();		
		if (DEBUG) show_track();
		if (DEBUG) show_boxes();
	}

	create_barrier_semaphores();
	create_coordinator_thread();
	create_pilots_threads();

	if (DEBUG) printf("\n[Foi dada a largada]\n");
	start = 1;

	join_threads();

	if (DEBUG) printf("\n[Corrida finalizada]\n");
	
	show_race_result();
	show_championship_classification();
	show_teams_classification();

	clean_up();
	
	return EXIT_SUCCESS;
}