Source-Changes archive

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

CVS commit: src/sys



Module Name:    src
Committed By:   riastradh
Date:           Sun Jun 26 22:31:38 UTC 2022

Modified Files:
        src/sys/kern: subr_time.c
        src/sys/sys: time.h

Log Message:
kern: New functions timespecaddok, timespecsubok.

Return false if timespecadd or timespecsub with the same arguments
would overflow (possibly in an intermediate calculation), true if OK.

Typical usage:

sys_wotsit(...)
{
        ...
        if (!timespecsubok(x, y))
                return EINVAL;
        timespecub(x, y, xydelta);
        ...
}


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/kern/subr_time.c
cvs rdiff -u -r1.79 -r1.80 src/sys/sys/time.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index