Re: [RFC PATCH 03/10] perf workqueue: add threadpool start and stop functions
From: Arnaldo Carvalho de Melo
Date: Thu Jul 15 2021 - 16:44:06 EST
Em Thu, Jul 15, 2021 at 06:42:16PM +0200, Riccardo Mancini escreveu:
> Hi Arnaldo,
>
> On Wed, 2021-07-14 at 12:15 -0300, Arnaldo Carvalho de Melo wrote:
> > Em Tue, Jul 13, 2021 at 02:11:14PM +0200, Riccardo Mancini escreveu:
> > > +++ b/tools/perf/util/workqueue/threadpool.c
> > > @@ -4,12 +4,23 @@
> > > #include <unistd.h>
> > > #include <errno.h>
> > > #include <string.h>
> > > +#include <pthread.h>
> > > +#include <signal.h>
> > > +#include <syscall.h>
> > > #include "debug.h"
> > > #include "asm/bug.h"
> > > #include "threadpool.h"
> > >
> > > +#ifndef HAVE_GETTID
> > > +static inline pid_t gettid(void)
> > > +{
> > > + return (pid_t)syscall(__NR_gettid);
> > > +}
> > > +#endif
> > Isn't this defined elsewhere? Yeah, when we decide to move it to
> > tools/lib/workqueue/ we'll need it, but for now, reduce patch size.
> No, it's just statically defined in tools/perf/jvmti/jvmti_agent.c.
> I saw there is a libc_compat.h header in tools/include/tools, I could put this
> definition there, and remove the one from jvmti_agent.c.
Please, do it as a prep patch.
Thanks,
- Arnaldo