patches13/0008-name-pthreads-easier-debugging.patch

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7054 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
Lionel Gauthier
2015-04-09 09:12:21 +00:00
parent e337a52ee2
commit 4649f42a22
7 changed files with 23 additions and 2 deletions
+3
View File
@@ -709,6 +709,9 @@ int itti_create_task(task_id_t task_id, void *(*start_routine)(void *), void *ar
result = pthread_create (&itti_desc.threads[thread_id].task_thread, NULL, start_routine, args_p);
AssertFatal (result >= 0, "Thread creation for task %d, thread %d failed (%d)!\n", task_id, thread_id, result);
char name[16];
snprintf( name, sizeof(name), "ITTI %d", thread_id );
pthread_setname_np( itti_desc.threads[thread_id].task_thread, name );
itti_desc.created_tasks ++;