This patch set implements select() on top of edge-triggered epoll.  Ron needed
this for dropbear, and it's probably the third or fourth time select() has come
up, so it's time to implement it.

Our select() is spurious, so any application using it will need to do so in a
loop with non-blocking I/O.

Other than select(), this patchset brings in a few fixes for epoll, which were
needed for select(); a uthread-mutex API; and a few other fixups. 

------------
You can also find this patch set at:

[email protected]:brho/akaros.git
From: 6f4d4c7ab448 master
To: f9d668946415 select

And view them at: 

https://github.com/brho/akaros/compare/6f4d4c7ab448...f9d668946415

------------


Barret Rhoden (17):
  Properly finalize contexts when reflecting traps
  Allows IRQs to be disabled while proc_destroy()ing
  Fix the lack of a return in sigreturn (XCC)
  Remove typedef for struct uthread
  Add a 2LS-independent mutex interface
  Provide a fake mutexes for the thread0 2LS
  Use mutexes in epoll instead of spinlocks
  Track all epoll controllers on a global list
  Track the FD assigned to a user FD (XCC)
  Add callbacks to close() (XCC)
  close() will trigger a epoll_ctl_del()
  Implement run_once() without atomic_t (XCC)
  Add a close callback for socket Rocks (XCC)
  Track listen FDs in socket rocks [1/3] (XCC)
  Remove epoll's listen_fd acrobatics [2/3]
  Remove _sock_get_listen_fd() [3/3] (XCC)
  Provide select() on top of epoll()

Ronald G. Minnich (1):
  Add taps for pipes.

 kern/arch/riscv/trap.c                             |   1 -
 kern/arch/x86/trap.c                               |   1 -
 kern/drivers/dev/pipe.c                            |  77 +++++++
 kern/include/ros/common.h                          |   6 +-
 kern/src/manager.c                                 |   1 -
 kern/src/monitor.c                                 |  10 +-
 kern/src/process.c                                 |   5 +-
 kern/src/syscall.c                                 |   1 -
 kern/src/trap.c                                    |   3 +-
 tests/select_server.c                              | 224 +++++++++++++++++++++
 .../glibc-2.19-akaros/sysdeps/akaros/Makefile      |   2 +
 .../glibc-2.19-akaros/sysdeps/akaros/Versions      |   3 +-
 .../glibc-2.19-akaros/sysdeps/akaros/close.c       |  14 +-
 .../glibc-2.19-akaros/sysdeps/akaros/close_cb.c    |  20 ++
 .../glibc-2.19-akaros/sysdeps/akaros/listen.c      |   2 +
 .../sysdeps/akaros/plan9_sockets.c                 |  28 +--
 .../sysdeps/akaros/plan9_sockets.h                 |   3 +
 .../glibc-2.19-akaros/sysdeps/akaros/sigreturn.c   |   2 +-
 .../glibc-2.19-akaros/sysdeps/akaros/socket.c      |   5 +
 .../sysdeps/akaros/sys/close_cb.h                  |  30 +++
 .../glibc-2.19-akaros/sysdeps/akaros/sys/user_fd.h |   1 +
 .../glibc-2.19-akaros/sysdeps/akaros/user_fd.c     |   9 +-
 user/iplib/epoll.c                                 | 100 ++++-----
 user/iplib/select.c                                | 207 +++++++++++++++++++
 user/parlib/include/uthread.h                      |  16 +-
 user/parlib/mutex.c                                | 125 ++++++++++++
 user/parlib/thread0_sched.c                        |  27 +++
 27 files changed, 831 insertions(+), 92 deletions(-)
 create mode 100644 tests/select_server.c
 create mode 100644 
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/close_cb.c
 create mode 100644 
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/sys/close_cb.h
 create mode 100644 user/iplib/select.c
 create mode 100644 user/parlib/mutex.c

-- 
2.6.0.rc2.230.g3dd15c0

-- 
You received this message because you are subscribed to the Google Groups 
"Akaros" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to