mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 10:15:57 +01:00
Comment on gem5's broken GDB on secondary core
Try to assert on all C programs if thread creation failed. C++ already throws by default.
This commit is contained in:
@@ -43,8 +43,8 @@ int main(void) {
|
||||
enum NUM_THREADS {NUM_THREADS = 2};
|
||||
pthread_t threads[NUM_THREADS];
|
||||
int thread_args[NUM_THREADS];
|
||||
pthread_create(&threads[0], NULL, main_thread_0, (void*)&thread_args[0]);
|
||||
pthread_create(&threads[1], NULL, main_thread_1, (void*)&thread_args[1]);
|
||||
assert(!pthread_create(&threads[0], NULL, main_thread_0, (void*)&thread_args[0]));
|
||||
assert(!pthread_create(&threads[1], NULL, main_thread_1, (void*)&thread_args[1]));
|
||||
pthread_join(threads[0], NULL);
|
||||
pthread_join(threads[1], NULL);
|
||||
return EXIT_SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user