Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: christos-time_t has been merged wrote:

> On Mon, Jan 12, 2009 at 12:34:53AM +0900, Izumi Tsutsui wrote:
> > 
> > 1) use uint16_t for getsecs()
> > 
> >  65536 secs == ~18 hours are enough for boot, and
> >  only three files in sys/lib/libsa refer it.
> >  (not sure how many MD drivers also use it though)
> There is no point using a 16 bit item, it is likely to make the
> code larger.

(Note getsecs() is used only in network code, so
 it won't affect bootxx for disks which would have ~8KB limit)

Preparing a full 32 bit value in getsecs() could also
make the function larger.

On the other hand, some MD getsecs() values would wraparound
at !powerof2() value like 86400, so there is no proper way
for MI code to handle wraparound case with current code
even if we make it uint16_t.
(though it won't happen so often, ~once per a hour or per a day?)

Anyway, I'll make getsecs() returns (unsigned) satime_t
as christos suggested, so we can decide it later.

The target is to remove 64 bit time_t from standalone code :-)
Izumi Tsutsui

Home | Main Index | Thread Index | Old Index