int main() { unsigned int num_channels = xN_num_channels + num_fcp_channels; XSCChannelInfo infos[num_channels]; init_infos(infos); fill_slots(infos, num_channels); unsigned int starting_loops[2] = {6, 10}; for (unsigned int form=0; form<4; form++) { if (form == xN_narrow_slow) { printf("Narrow Slow channels:\n"); } else if (form == xN_narrow_fast) { printf("Narrow Fast channels:\n"); } else if (form == xN_wide_slow) { printf("Wide Slow channels:\n"); } else if (form == xN_wide_fast) { printf("Wide Fast channels:\n"); } char name_string[31+2+1] = ""; // max name length + two quotes + null terminator char loop_string[7] = ""; for (unsigned int which=0; which<2; which++) { for (unsigned int i=0; i<num_channels; i++) { if (form == infos[i].form) { sprintf(name_string, "\"x%i_%s\"", which, infos[i].tx_name); // one special case if ((which == 1) && (strcmp(infos[i].tx_name, "ctr_fcp") == 0)) { sprintf(name_string, "\"x0_lt_age_cs\""); } sprintf(loop_string, "LOOP%i", starting_loops[which] + infos[i].relative_loop_num); printf(" {%-33s, 'w', %6s, %2i,},\n", name_string, loop_string, infos[i].slot_num ); } } } } return 0; }
void prepare_queue(pkgstate* state) { state->slots.build_slots = NUM_BUILD_THREADS; state->slots.dl_slots = NUM_DL_THREADS; fill_slots(JT_DOWNLOAD, state); fill_slots(JT_BUILD, state); }