mirror of
https://github.com/hermitcore/libhermit.git
synced 2025-03-09 00:00:03 +01:00
add some debug messages
This commit is contained in:
parent
88890ebfb6
commit
9d23a19de9
1 changed files with 6 additions and 2 deletions
|
@ -15,11 +15,15 @@ void* thread_func(void* arg)
|
|||
int main(int argc, char** argv)
|
||||
{
|
||||
pthread_t threads[MAX_THREADS];
|
||||
int i, param[MAX_THREADS];
|
||||
int i, ret, param[MAX_THREADS];
|
||||
|
||||
for(i=0; i<MAX_THREADS; i++) {
|
||||
param[i] = i;
|
||||
pthread_create(threads+i, NULL, thread_func, param+i);
|
||||
ret = pthread_create(threads+i, NULL, thread_func, param+i);
|
||||
if (ret)
|
||||
printf("Thread creation failed! error = %d\n", ret);
|
||||
else
|
||||
printf("Create thread %d\n", i);
|
||||
}
|
||||
|
||||
/* wait until all threads have terminated */
|
||||
|
|
Loading…
Add table
Reference in a new issue