#include #include #include #include #include #define PROCESS_COUNT 1 void do_test_threads(void) { debug_printf("[do_test_threads]\n"); struct spawninfo *si = malloc(PROCESS_COUNT * sizeof(struct spawninfo)); domainid_t *pid = malloc(PROCESS_COUNT * sizeof(domainid_t)); for(uint i = 0; i < PROCESS_COUNT; ++i) { debug_printf("TEST_THREADS: spawn %u\n", i); CHECK_ERR(spawn_load_by_name("mallocator", &(si[i]), &(pid[i]))); } // while (true) { // debug_printf("[do_test_threads]: processes alive: "); // struct spawninfo* process = spawn_get_process_list(); // while (process != NULL) { // printf("%d, ", process->pid); // process = process->next; // } // printf("\n"); // //wait for 1 second but handle events in the mean time // barrelfish_usleep(1000000); // } }