lkml.org 
[lkml]   [2015]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [tip:perf/urgent] perf tools: Fix pthread_attr_setaffinity_np build error

* tip-bot for Adrian Hunter <tipbot@zytor.com> wrote:

> --- a/tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c
> +++ b/tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c
> @@ -5,10 +5,11 @@ int main(void)
> {
> int ret = 0;
> pthread_attr_t thread_attr;
> + cpu_set_t cs;
>
> pthread_attr_init(&thread_attr);
> /* don't care abt exact args, just the API itself in libpthread */
> - ret = pthread_attr_setaffinity_np(&thread_attr, 0, NULL);
> + ret = pthread_attr_setaffinity_np(&thread_attr, sizeof(cs), &cs);

So I'm splitting hairs, as we never run these testcases, but I think a
CPU_ZERO(&cs) is needed, as 'cs' might be uninitialized.

Thanks,

Ingo


\
 
 \ /
  Last update: 2015-03-01 18:21    [W:0.081 / U:0.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site