Untangling the glibc header rat's nest (P.2) (XCC)
authorBarret Rhoden <brho@cs.berkeley.edu>
Fri, 2 Oct 2015 14:14:04 +0000 (10:14 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Fri, 2 Oct 2015 14:25:46 +0000 (10:25 -0400)
commitff1e66754e7f06fdcbdaf77eb1ec9a7f13160688
tree9736f63a7dc628a514237882fe7fbaf2cb05df73
parent05ba316985ebcbe3c6d36ad8b5fd6d8d35b2a733
Untangling the glibc header rat's nest (P.2) (XCC)

This time around, we'll try and fix up the time headers.  Ideally,
anything that is part of the kernel interface is exposed via the kernel
headers.  For instance, struct timespec and maybe struct timeval (which
is just mentioned in a comment).

It's relatively easy to override timeval - that's what bits/time.h is
for (it gets included by sys/time.h).  However, timespec is a little
trickier, since it's defined directly in time.h, not bits/time.h that is
made to be sysdep-overrode.  (Note that timespec is available to
programs via #include time.h.  Timeval comes from sys/time.h...).
Overriding time.h required the same file twice:
sysdeps/akaros/time/time.h and sysdeps/akaros/time.h.

With this dive into the rats nest, our kernel header no longer needs the
mysterious #define __timespec_defined.

Rats' nest ref: 5b5cc8856

Rebuild glibc.
kern/include/ros/time.h
tests/timer_deps.c
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/Makefile
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/bits/time.h [new file with mode: 0644]
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/time.h [new file with mode: 0644]
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/time/time.h [new file with mode: 0644]