- s_thread_entry_t threads_table[THREAD_THREADS_MAX] = {0};
- unsigned int i,j;
- int exit_code = 0;
-
- xbt_init(&argc,argv);
-
- sem = xbt_os_sem_init(1);
-
- i = 0;
-
- while(i < THREAD_THREADS_MAX)
- {
- threads_table[i].thread_index = i;
-
- if(NULL == (threads_table[i].thread = xbt_os_thread_create("thread",thread_routine,&(threads_table[i].thread_index))))
- break;
-
- i++;
- }
-
- /* close the thread handles */
- for(j = 0; j < THREAD_THREADS_MAX; j++)
- xbt_os_thread_join(threads_table[j].thread,NULL);
-
- xbt_os_sem_destroy(sem);
-
- INFO1("sem_basic terminated with exit code %d (success)",EXIT_SUCCESS);
-
- xbt_exit();
-
- return EXIT_SUCCESS;
-
+ s_thread_entry_t threads_table[THREAD_THREADS_MAX] = { 0 };
+ unsigned int i, j;
+ int exit_code = 0;
+
+ xbt_init(&argc, argv);
+
+ sem = xbt_os_sem_init(1);
+
+ i = 0;
+
+ while (i < THREAD_THREADS_MAX) {
+ threads_table[i].thread_index = i;
+
+ if (NULL ==
+ (threads_table[i].thread =
+ xbt_os_thread_create("thread", thread_routine,
+ &(threads_table[i].thread_index))))
+ break;
+
+ i++;
+ }
+
+ /* close the thread handles */
+ for (j = 0; j < THREAD_THREADS_MAX; j++)
+ xbt_os_thread_join(threads_table[j].thread, NULL);
+
+ xbt_os_sem_destroy(sem);
+
+ XBT_INFO("sem_basic terminated with exit code %d (success)", EXIT_SUCCESS);
+
+ return EXIT_SUCCESS;
+