- smx_process_t process, p_next;
- xbt_swag_foreach_safe(process, p_next, processes) {
- /* if the context has no thread associated, create one for it (first run) */
- if (!(((smx_ctx_thread_t) process->context)->thread)) {
- ((smx_ctx_thread_t)process->context)->thread =
- xbt_os_thread_create(NULL, smx_ctx_thread_wrapper, process->context, process);
- xbt_os_sem_acquire(((smx_ctx_thread_t) process->context)->end);
- }