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:           Mon May  4 18:23:37 UTC 2020

Modified Files:
        src/sys/kern: kern_condvar.c subr_time.c
        src/sys/sys: timevar.h

Log Message:
New timedwaitclock_setup.

C99 initializers would have been nice, but part of the struct is
explicit parameters and part of the struct is implicit state, and
-Wmissing-field-initializers can't discriminate between them
(although for some reason it doesn't always fire!).

Instead, just do:

        struct timedwaitclock T;

        timedwaitclock_setup(&T, timeout, clockid, flags, epsilon);
        while (...) {
                error = timedwaitclock_begin(&T, &timo);
                if (error)
                        ...
                error = waitwhatever(timo);
                timedwaitclock_end(&T);
                ...
        }


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/kern/kern_condvar.c
cvs rdiff -u -r1.22 -r1.23 src/sys/kern/subr_time.c
cvs rdiff -u -r1.42 -r1.43 src/sys/sys/timevar.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