<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c, branch docs-5.3</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-5.3</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-5.3'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2015-03-21T17:53:35+00:00</updated>
<entry>
<title>perf build: Move feature checks code under tools/build</title>
<updated>2015-03-21T17:53:35+00:00</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@kernel.org</email>
</author>
<published>2015-03-01T20:19:44+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=e6c76d620379fd65fc0310aee1785ff7b1b10236'/>
<id>urn:sha1:e6c76d620379fd65fc0310aee1785ff7b1b10236</id>
<content type='text'>
Moving feature checks code under tools/build directory.

Changing also $feature_dir to point to new feature directory location
and perf Makefiles to include Makefile.feature from new location.

Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Corey Ashford &lt;cjashfor@linux.vnet.ibm.com&gt;
Cc: David Ahern &lt;david.ahern@oracle.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: http://lkml.kernel.org/n/tip-3lamtb30dhf4wo99y1n8kxg0@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools: Initialize cpu set in pthread_attr_setaffinity_np feature test</title>
<updated>2015-03-02T15:48:16+00:00</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2015-03-02T07:59:05+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=543d976fa2ebf5543bd07b5d487bf3a6144c0886'/>
<id>urn:sha1:543d976fa2ebf5543bd07b5d487bf3a6144c0886</id>
<content type='text'>
Feature tests are compiled but not executed, however it might avoid a
future uninitialized variable warning, so initialize the cpu set.

Reported-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: linux-tip-commits@vger.kernel.org
Link: http://lkml.kernel.org/r/54F41849.1010906@intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools: Fix pthread_attr_setaffinity_np build error</title>
<updated>2015-02-25T15:18:03+00:00</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2015-02-24T10:46:06+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=95a09cfa3cdf94231ce511f1697754482b918d39'/>
<id>urn:sha1:95a09cfa3cdf94231ce511f1697754482b918d39</id>
<content type='text'>
Feature detection for pthread_attr_setaffinity_np was failing, producing
this error:

  In file included from bench/futex-hash.c:17:0:
  bench/futex.h:73:19: error: conflicting types for ‘pthread_attr_setaffinity_np’
   static inline int pthread_attr_setaffinity_np(pthread_attr_t *attr,
                   ^
  In file included from bench/futex.h:72:0,
                   from bench/futex-hash.c:17:
  /usr/include/pthread.h:407:12: note: previous declaration of ‘pthread_attr_setaffinity_np’ was here
   extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr,
            ^
  make[3]: *** [bench/futex-hash.o] Error 1
  make[2]: *** [bench] Error 2
  make[2]: *** Waiting for unfinished jobs....

  This was because compiling test-pthread-attr-setaffinity-np.c
  failed due to the function arguments:

  test-pthread-attr-setaffinity-np.c: In function ‘main’:
  test-pthread-attr-setaffinity-np.c:11:2: warning: null argument where non-null required (argument 3) [-Wnonnull]
    ret = pthread_attr_setaffinity_np(&amp;thread_attr, 0, NULL);
    ^
  So fix the arguments.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Tested-by: Stephane Eranian &lt;eranian@google.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Link: http://lkml.kernel.org/r/1424774766-24194-1-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools: Provide stub for missing pthread_attr_setaffinity_np</title>
<updated>2015-01-28T15:43:32+00:00</updated>
<author>
<name>Vineet Gupta</name>
<email>Vineet.Gupta1@synopsys.com</email>
</author>
<published>2015-01-13T13:43:24+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=459a3df76c99124fd222586be7f10f862547e7a9'/>
<id>urn:sha1:459a3df76c99124fd222586be7f10f862547e7a9</id>
<content type='text'>
uClibc Linuxthreads.old doesn't support the pthread_attr_setaffinity_np()
functioo:

   -----------------&gt;8-----------------------
  CC       bench/futex-hash.o
  CC       bench/futex-wake.o
bench/futex-hash.c: In function 'bench_futex_hash':
bench/futex-hash.c:161:3: error: implicit declaration of function
'pthread_attr_setaffinity_np' [-Werror=implicit-function-declaration]
   ret = pthread_attr_setaffinity_np(&amp;thread_attr, sizeof(cpu_set_t),
&amp;cpu);
   ^
bench/futex-hash.c:161:3: error: nested extern declaration of
'pthread_attr_setaffinity_np' [-Werror=nested-externs]
   -----------------&gt;8-----------------------

So introduce a test to check that and if not available provide a stub.

Signed-off-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;
Acked-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Alexey Brodkin &lt;Alexey.Brodkin@synopsys.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: http://lkml.kernel.org/r/1421156604-30603-6-git-send-email-vgupta@synopsys.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
</feed>
