void HiSax_closecard(int cardnr) { int i,last=nrcards - 1; if (cardnr>last) return; if (cards[cardnr].cs) { ll_stop(cards[cardnr].cs); release_tei(cards[cardnr].cs); CallcFreeChan(cards[cardnr].cs); closecard(cardnr); if (cards[cardnr].cs->irq) free_irq(cards[cardnr].cs->irq, cards[cardnr].cs); kfree((void *) cards[cardnr].cs); cards[cardnr].cs = NULL; } i = cardnr; while (i!=last) { cards[i] = cards[i+1]; i++; } nrcards--; }
int main(int argc, char** argv) { (void)argc; (void)argv; ll_init(); do_test(); /* Separated out into a function so one can verify that calling it twice or thrice, it still works. */ do_test(); ll_stop(); return 0; }
void os_allstop(void) { if (perf_profiling_started()) { profiling_stop(); } if (perf_ll_started()) { ll_stop(); } if (perf_pqos_cmt_started()) { proc_pqos_func(NULL, os_pqos_cmt_proc_free); } if (perf_uncore_started()) { uncore_stop_all(); } }
int main(int argc,char** argv) { char * known_good_prohibits[] = {NULL}; char * known_good_permits[] = {LL_DISTRIBUTION, LL_REPRODUCTION, NULL}; char * known_good_requires[] = {LL_NOTICE, LL_ATTRIBUTION, NULL}; char * known_good_bync_permits[] = { LL_DISTRIBUTION, LL_REPRODUCTION, LL_DERIVATIVE_WORKS, NULL}; ll_uri_t license; ll_uri_t other_license; ll_juris_t j; char* name; ll_uri_t* p; int b; (void)argc; (void)argv; ll_init(); license = "http://creativecommons.org/licenses/by-nd/2.0/de/"; test_get_attribute_jurisdiction(); test_get_attribute_jurisdiction_localized(); test_get_attribute_name_system_lang(); test_get_attribute_name_whatever_lang(); test_get_version(); p = ll_get_attribute(license, LL_PROHIBITS, false); printf("get_prohibits: "); assert (ll_sets_equal(p, known_good_prohibits)); ll_list_print(p); ll_free_list(p); p = ll_get_attribute(license, LL_PERMITS, false); printf("get_permits: "); assert (ll_sets_equal(p, known_good_permits)); ll_list_print(p); ll_free_list(p); p = ll_get_attribute(license, LL_REQUIRES, false); printf("get_requires: "); assert (ll_sets_equal(p, known_good_requires)); ll_list_print(p); ll_free_list(p); /* Adding a test for http://code.creativecommons.org/issues/issue78 */ other_license = "http://creativecommons.org/licenses/by-nc/3.0/"; p = ll_get_attribute(other_license, LL_PERMITS, false); assert (ll_sets_equal(p, known_good_bync_permits)); /* Adding a test for http://code.creativecommons.org/issues/issue78 as seen by the Python bindings, which always set the locale parameter to true. */ other_license = "http://creativecommons.org/licenses/by-nc/3.0/"; p = ll_get_attribute(other_license, LL_PERMITS, true); assert (ll_sets_equal(p, known_good_bync_permits)); b = ll_verify_uri(license); printf("verify_uri: %d\n",b); assert (b == 1); p = ll_get_all_licenses(); printf("get_all_licenses: "); ll_list_print(p); assert (ll_list_contains(p, license)); ll_free_list(p); p = ll_get_licenses("http://creativecommons.org/international/de/"); printf("get_licenses: "); ll_list_print(p); assert (ll_list_contains(p, license)); ll_free_list(p); /* Check that printing a license's info at least does something. */ ll_license_print_info ("http://creativecommons.org/licenses/by/3.0/us"); /* Check that printing a license's info when passed NULL doesn't explode. */ ll_license_print_info(NULL); ll_stop(); return 0; }