Changes in / [7c33187:7bdf6d1]


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/trace_parallel.c

    rc1205bd r83724d9  
    15461546                       const char *name) {
    15471547#ifdef __linux__
    1548         pthread_attr_t attrib;
    15491548        cpu_set_t cpus;
    15501549        int i;
     
    15641563        for (i = 0; i < get_nb_cores(); i++)
    15651564                CPU_SET(i, &cpus);
    1566         pthread_attr_init(&attrib);
    1567         pthread_attr_setaffinity_np(&attrib, sizeof(cpus), &cpus);
    1568         ret = pthread_create(&t->tid, &attrib, start_routine, (void *) trace);
    1569         pthread_attr_destroy(&attrib);
     1565
     1566        ret = pthread_create(&t->tid, NULL, start_routine, (void *) trace);
     1567        if( ret == 0 ) {
     1568                ret = pthread_setaffinity_np(t->tid, sizeof(cpus), &cpus);
     1569        }
     1570
    15701571#else
    15711572        ret = pthread_create(&t->tid, NULL, start_routine, (void *) trace);
Note: See TracChangeset for help on using the changeset viewer.