All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t 03/13] lib/igt_aux: Include unistd.h for	gettid() on Android
Date: Wed, 19 Apr 2017 17:23:46 +0300	[thread overview]
Message-ID: <8760i0tr0t.fsf@intel.com> (raw)
In-Reply-To: <20170419140218.GA13898@ahiler-desk.igk.intel.com>

On Wed, 19 Apr 2017, Arkadiusz Hiler <arkadiusz.hiler@intel.com> wrote:
> On Wed, Apr 19, 2017 at 03:22:19PM +0300, Jani Nikula wrote:
>> On Wed, 19 Apr 2017, Arkadiusz Hiler <arkadiusz.hiler@intel.com> wrote:
>> > We define gettid() using syscall() because glibc does not provide a
>> > wrapper.
>> >
>> > Android's bionic got the syscall covered though.
>> >
>> > Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
>> > ---
>> >  lib/igt_aux.h | 5 +++++
>> >  1 file changed, 5 insertions(+)
>> >
>> > diff --git a/lib/igt_aux.h b/lib/igt_aux.h
>> > index e62858e..54b9716 100644
>> > --- a/lib/igt_aux.h
>> > +++ b/lib/igt_aux.h
>> > @@ -43,7 +43,12 @@ extern int num_trash_bos;
>> >  #define NSEC_PER_SEC (1000*USEC_PER_SEC)
>> >  
>> >  /* signal interrupt helpers */
>> > +#ifdef ANDROID
>> 
>> Seems like this should be something like HAVE_GETTID, defined by
>> configure or by android makefiles?
>
> Yeah, but that's not that easy (yet) and that's not the only area which
> would use it - notice the thing with cairo from the cover letter.
>
> config.h is generated in a ugly way for Android - lib/Android.mk does
> that. Also if you ./configure it stops compiling for Android causing
> confusing error.
>
> Whole area could use some heavy reworking.
>
> One approach would be to mimic what other projects do:
>
>  * have config_android.h with set of sane #defines (as environment is
>    more static and there is no ac/am)
>
>  * don't define HAVE_CONFIG_H and just `-include config_android.h` on...
>    Android
>
>  * add gettid() discovery via ac for Linux (I don't think that any
>    libc other than bionic wraps that call though)
>
>
> But that would made a whole series.
> I would like to go with #ifdef ANDROID for now.

Fair enough.

It's just that I cringe seeing #ifdef <ENVIRONMENT> instead of #ifdef
<FEATURE>, when <ENVIRONMENT> and <FEATURE> are not interchangeable or
1:1. For example, glibc might include gettid later.

BR,
Jani.

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-04-19 14:23 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-19 11:01 [PATCH i-g-t 00/13] Fix IGTs for Android Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 01/13] tests/drm_import_export: Include {i915_, }drm.h properly Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 02/13] Make conditions on HAVE_UDEV consistent Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 03/13] lib/igt_aux: Include unistd.h for gettid() on Android Arkadiusz Hiler
2017-04-19 12:22   ` Jani Nikula
2017-04-19 14:02     ` Arkadiusz Hiler
2017-04-19 14:23       ` Jani Nikula [this message]
2017-04-20 10:33         ` Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 04/13] lib/igt_aux: Make procps optional Arkadiusz Hiler
2017-04-19 12:24   ` Jani Nikula
2017-04-19 13:29     ` [PATCH i-g-t v2] " Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 05/13] chamelium: Fix build issues on Android Arkadiusz Hiler
2017-05-02  9:53   ` Petri Latvala
2017-05-05 11:46     ` Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 06/13] tools/Android.mk: Add guc_logger and l3_parity skip list Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 07/13] tests/Android.mk: Add perf to " Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 08/13] benchmarks/Android.mk: Add gem_latency " Arkadiusz Hiler
2017-04-19 16:58   ` Chris Wilson
2017-04-20 10:18     ` Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 09/13] Android.mk: Fix libkmod use Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 10/13] Android.mk: Filter out *.h from src files Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 11/13] Android.mk: Use drm stubs Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 12/13] tools/Android.mk: Fix zlib inclusion Arkadiusz Hiler
2017-04-19 11:01 ` [PATCH i-g-t 13/13] tests/gem_exec_nop: Disable headless subtest on cairoless Android Arkadiusz Hiler
2017-05-04  8:00   ` Petri Latvala
2017-05-05 11:47     ` Arkadiusz Hiler
  -- strict thread matches above, loose matches on Subject: below --
2017-05-16 13:24 [PATCH i-g-t v2 00/13] Fix IGTs for Android Arkadiusz Hiler
2017-05-16 13:24 ` [PATCH i-g-t 03/13] lib/igt_aux: Include unistd.h for gettid() on Android Arkadiusz Hiler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8760i0tr0t.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=arkadiusz.hiler@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.