|
|
@ -10,7 +10,7 @@ typedef struct { |
|
|
|
} pthread_wrapper_t; |
|
|
|
|
|
|
|
void* pthread_wrapper(void *arg) { |
|
|
|
printf("wrapper at %ld\n", pthread_self()); |
|
|
|
printf("wrapper at %p\n", pthread_self()); |
|
|
|
pthread_wrapper_t *kk = (pthread_wrapper_t*)arg; |
|
|
|
kk->fn(kk->arg); |
|
|
|
return NULL; |
|
|
@ -33,7 +33,7 @@ void executor(void(*fn)(void*), void *arg) { |
|
|
|
} |
|
|
|
|
|
|
|
int main() { |
|
|
|
// printf("prebuild available -> %d\n", is_all_cases_prebuild_available());
|
|
|
|
// printf("prebuild available -> %d\n", all_cases_prebuild_available());
|
|
|
|
//
|
|
|
|
// printf("prebuild begin\n");
|
|
|
|
// all_cases_prebuild();
|
|
|
@ -42,38 +42,53 @@ int main() { |
|
|
|
// printf("prebuild begin\n");
|
|
|
|
// all_cases_prebuild_async(executor, callback);
|
|
|
|
// printf("prebuild func exited\n");
|
|
|
|
// printf("prebuild available -> %d\n", is_all_cases_prebuild_available());
|
|
|
|
// printf("prebuild available -> %d\n", all_cases_prebuild_available());
|
|
|
|
// printf("start sleep 3s\n");
|
|
|
|
// sleep(3);
|
|
|
|
//
|
|
|
|
// printf("prebuild available -> %d\n", is_all_cases_prebuild_available());
|
|
|
|
// printf("prebuild available -> %d\n", all_cases_prebuild_available());
|
|
|
|
|
|
|
|
|
|
|
|
printf("build available -> %d\n", is_all_cases_available()); |
|
|
|
|
|
|
|
// printf("build available -> %d\n", all_cases_available());
|
|
|
|
//
|
|
|
|
// printf("build begin\n");
|
|
|
|
// all_cases_build();
|
|
|
|
// printf("build complete\n");
|
|
|
|
|
|
|
|
//
|
|
|
|
// printf("build begin\n");
|
|
|
|
// all_cases_build_async(executor, callback);
|
|
|
|
// printf("build func exited\n");
|
|
|
|
// printf("build available -> %d\n", is_all_cases_available());
|
|
|
|
// printf("build available -> %d\n", all_cases_available());
|
|
|
|
// printf("start sleep 3s\n");
|
|
|
|
// sleep(3);
|
|
|
|
|
|
|
|
//
|
|
|
|
// printf("build begin\n");
|
|
|
|
// all_cases_build_parallel(executor);
|
|
|
|
// printf("build complete\n");
|
|
|
|
//
|
|
|
|
// printf("build begin\n");
|
|
|
|
// all_cases_build_parallel_async(executor, callback);
|
|
|
|
// printf("build func exited\n");
|
|
|
|
// printf("build available -> %d\n", all_cases_available());
|
|
|
|
// printf("start sleep 3s\n");
|
|
|
|
// sleep(3);
|
|
|
|
//
|
|
|
|
// printf("build available -> %d\n", all_cases_available());
|
|
|
|
|
|
|
|
|
|
|
|
printf("build begin\n"); |
|
|
|
all_cases_build_parallel_async(executor, callback); |
|
|
|
printf("build func exited\n"); |
|
|
|
printf("build available -> %d\n", is_all_cases_available()); |
|
|
|
printf("start sleep 3s\n"); |
|
|
|
sleep(3); |
|
|
|
// int i = -2;
|
|
|
|
// for (; i < 18; ++i) {
|
|
|
|
// printf("all cases %d -> %d (%p)\n", i, all_cases_num(i), all_cases_export(i));
|
|
|
|
// }
|
|
|
|
|
|
|
|
printf("build available -> %d\n", is_all_cases_available()); |
|
|
|
int i = 0; |
|
|
|
for (; i < 16; ++i) { |
|
|
|
int j = 0; |
|
|
|
const klotski_u32 *ranges = all_cases_export(i); |
|
|
|
for (; j < all_cases_num(i); ++j) { |
|
|
|
printf("%X%08X\n", i, ranges[j]); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return 0; |
|
|
|
} |
|
|
|