Vote count: 0 I have the following simple program: #include #include #include #include #include #include #define handle_error_en(en, msg) {do { ero = en; perror(msg); exit(EXIT_FAILURE); } while (0);} #define status_check(stat) ((stat != 0) ? (handle_error_en(stat, "status error")) : ((void)0)) static void* thread_start(void *arg) { printf("%sn", "thread working.."); sleep(1); retu NULL; } int main(int argc, char const *argv[]) { int status; pthread_t thread; status = pthread_create(&thread, NULL, thread_start, NULL); status_check(status); status = pthread_join(thread, NULL); status_check(status); printf("%sn", "exit program.."); retu 0; } When I run Valgind with Valgrind --tool=helgrind ./t...
ادامه مطلب