Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Oct 2001 17:57:16 -0700 (PDT)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Dag-Erling Smorgrav <des@ofug.org>
Cc:        Mike Smith <msmith@FreeBSD.ORG>, Bakul Shah <bakul@bitblocks.com>, Poul-Henning Kamp <phk@critter.freebsd.dk>, Peter Wemm <peter@wemm.org>, arch@FreeBSD.ORG
Subject:   Re: 64 bit times revisited..
Message-ID:  <200110270057.f9R0vG642220@apollo.backplane.com>
References:  <200110270013.f9R0DCv05573@mass.dis.org> <200110270038.f9R0cT442082@apollo.backplane.com> <xzpitd1rjw6.fsf@flood.ping.uio.no>

next in thread | previous in thread | raw e-mail | index | archive | help

:
:Matthew Dillon <dillon@apollo.backplane.com> writes:
:>     Is anyone game for this project?
:
:I'd volunteer, but I have too many of my own patches to worry about
:right now.  How about mid-November, after BSDCon Europe?
:
:DES
:-- 
:Dag-Erling Smorgrav - des@ofug.org

    With the vnode and sync scaleability stuff *almost* out of the way I've
    started working on the Giant lock unwinding stuff, so I don't have time
    this moment either, but I would certainly have time available 
    mid-november to help out!  

    The project could be done and stabilized in a week with three or more
    people helping out.  There is good functional separation:


    * type changes (stat, timespec, timeval, timex, time_t)
    * syscall number rolls & compatibility code (sorry BSDI, it's more then 10)
    * kernel side audit to handle new time_t & structures
    * libc audit - all time related functions
    * userland audit to handle new time_t & structures


    I think everyone has agreed on time_t going to 64 bits, and of course
    it must be seconds.  We have to decide in regards to timeval, stat, and
    timespec.  It looks like we may not have to mess with timex, which is
    good.

machine/ansi.h:#define  _BSD_TIME_T_    long                    /* time()... */

struct timeval {
    long    tv_sec;         /* seconds */
    long    tv_usec;        /* and microseconds */
};

struct timespec {
    time_t  tv_sec;         /* seconds */
    long    tv_nsec;        /* and nanoseconds */
};

struct stat {
...
#ifndef _POSIX_SOURCE
    struct  timespec st_atimespec;  /* time of last access */
    struct  timespec st_mtimespec;  /* time of last data modification */
    struct  timespec st_ctimespec;  /* time of last file status change */
#else
    time_t    st_atime;             /* time of last access */
    long      st_atimensec;         /* nsec of last access */
    time_t    st_mtime;             /* time of last data modification */
    long      st_mtimensec;         /* nsec of last data modification */
    time_t    st_ctime;             /* time of last file status change */
    long      st_ctimensec;         /* nsec of last file status change */
#endif
};

    (there might be other in-kernel structures that we have to mess with)

    Obviously tv_sec in timeval has to change from long to time_t, and
    time_t has to change from long to int64_t.  The stat structure gets
    a bit larger... presumably we have to keep the 'long ... nsec' 
    elements in both the timespec and stat structure to maintain 
    compatibility.

    Anything else?

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200110270057.f9R0vG642220>