Changeset 83724d9


Ignore:
Timestamp:
04/27/18 10:16:13 (2 years ago)
Author:
Tim Dawson <timdawson264@…>
Branches:
cachetimestamps, develop, etsilive, master, rc-4.0.4, ringdecrementfix, ringperformance
Children:
7bdf6d1
Parents:
314239a
git-author:
Tim Dawson <timdawson264@…> (04/27/18 09:51:25)
git-committer:
Tim Dawson <timdawson264@…> (04/27/18 10:16:13)
Message:

Removed pthread_attr_setaffinity_np() in exchange for pthread_setaffinity_np().
pthread_attr_setaffinity_np is a glibc extention and is not compatible with musl libc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/trace_parallel.c

    re375e0f 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.