[riot-commits] [RIOT-OS/RIOT] a274ea: cpu/native: async_read: rewrite select() call to p...

Alexandre Abadie noreply at github.com
Tue Jul 21 14:01:50 CEST 2020


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: a274ea45fc5b483ea41ae0d1f1993898db30d32a
      https://github.com/RIOT-OS/RIOT/commit/a274ea45fc5b483ea41ae0d1f1993898db30d32a
  Author: Koen Zandberg <koen at bergzand.net>
  Date:   2020-07-21 (Tue, 21 Jul 2020)

  Changed paths:
    M cpu/native/async_read.c
    M cpu/native/include/async_read.h
    M cpu/native/include/native_internal.h
    M cpu/native/syscalls.c

  Log Message:
  -----------
  cpu/native: async_read: rewrite select() call to poll()

select() can not listen to POLLPRI events which are used by the
Kernel's GPIO API.

In preparation for that, rewrite async_read() to use poll() instead
of select().


  Commit: 47e2885f80a1e8f4664b1a2118948ffb836c8126
      https://github.com/RIOT-OS/RIOT/commit/47e2885f80a1e8f4664b1a2118948ffb836c8126
  Author: Koen Zandberg <koen at bergzand.net>
  Date:   2020-07-21 (Tue, 21 Jul 2020)

  Changed paths:
    M cpu/native/async_read.c
    M cpu/native/include/async_read.h

  Log Message:
  -----------
  cpu/native: async_read: add native_async_read_add_int_handler()

fcntl(fd, F_SETOWN, getpid()); doesn't seem to work on Linux
to get generate a signal when an event on the GPIO fd occurs.

So fall back to the same method as on OS X and call poll() in
a child process.


  Commit: b7219d68f48eff2a7dce316505ce38443e59a3fa
      https://github.com/RIOT-OS/RIOT/commit/b7219d68f48eff2a7dce316505ce38443e59a3fa
  Author: Alexandre Abadie <alexandre.abadie at inria.fr>
  Date:   2020-07-21 (Tue, 21 Jul 2020)

  Changed paths:
    M cpu/native/async_read.c
    M cpu/native/include/async_read.h
    M cpu/native/include/native_internal.h
    M cpu/native/syscalls.c

  Log Message:
  -----------
  Merge pull request #12428 from benpicco/native_poll

native/async_read: use poll() instead of select()


Compare: https://github.com/RIOT-OS/RIOT/compare/0b549c6e0cb0...b7219d68f48e


More information about the commits mailing list