@@ -65,40 +65,40 @@ void _al_thread_create(_AL_THREAD *thread, void (*proc)(_AL_THREAD*, void*), voi
65
65
status = pthread_create (& thread -> thread , NULL , thread_proc_trampoline , thread );
66
66
ASSERT (status == 0 );
67
67
if (status != 0 )
68
- abort ();
68
+ abort ();
69
69
}
70
70
}
71
71
72
72
73
73
void _al_thread_with_stacksize_create (_AL_THREAD * thread , void (* proc )(_AL_THREAD * , void * ), void * arg , size_t stacksize )
74
74
{
75
- ASSERT (stacksize >= PTHREAD_STACK_MIN );
76
- ASSERT (thread );
77
- ASSERT (proc );
78
- {
79
- int status ;
80
-
81
- pthread_mutex_init (& thread -> mutex , NULL );
82
-
83
- thread -> should_stop = false;
84
- thread -> proc = proc ;
85
- thread -> arg = arg ;
86
-
87
- pthread_attr_t thread_attr ;
88
- int result = 0 ;
89
- result = pthread_attr_init (& thread_attr );
90
- ASSERT (result == 0 );
75
+ ASSERT (stacksize >= PTHREAD_STACK_MIN );
76
+ ASSERT (thread );
77
+ ASSERT (proc );
78
+ {
79
+ int status ;
80
+
81
+ pthread_mutex_init (& thread -> mutex , NULL );
82
+
83
+ thread -> should_stop = false;
84
+ thread -> proc = proc ;
85
+ thread -> arg = arg ;
86
+
87
+ pthread_attr_t thread_attr ;
88
+ int result = 0 ;
89
+ result = pthread_attr_init (& thread_attr );
90
+ ASSERT (result == 0 );
91
91
92
- // On some systems, pthread_attr_setstacksize() can fail
93
- // if stacksize is not a multiple of the system page size.
94
- result = pthread_attr_setstacksize (& thread_attr , stacksize );
95
- ASSERT (result == 0 );
92
+ // On some systems, pthread_attr_setstacksize() can fail
93
+ // if stacksize is not a multiple of the system page size.
94
+ result = pthread_attr_setstacksize (& thread_attr , stacksize );
95
+ ASSERT (result == 0 );
96
96
97
- status = pthread_create (& thread -> thread , & thread_attr , thread_proc_trampoline , thread );
98
- ASSERT (status == 0 );
99
- if (status != 0 )
100
- abort ();
101
- }
97
+ status = pthread_create (& thread -> thread , & thread_attr , thread_proc_trampoline , thread );
98
+ ASSERT (status == 0 );
99
+ if (status != 0 )
100
+ abort ();
101
+ }
102
102
}
103
103
104
104
0 commit comments