FreeBSD/sys/compat/cloudabi/cloudabi_futex.c
/* Converts an absolute timestamp and precision to a pair of sbintime values. */
Converts an absolute timestamp and precision to a pair of sbintime values.
Converts an absolute timestamp and precision to a pair of sbintime values .
static int
futex_queue_convert_timestamp(struct thread *td, cloudabi_clockid_t clock_id,
    cloudabi_timestamp_t timeout, cloudabi_timestamp_t precision,
    sbintime_t *sbttimeout, sbintime_t *sbtprecision)
{
	cloudabi_timestamp_t now;
	int error;
	error = cloudabi_clock_time_get(td, clock_id, &now);
	if (error != 0)
		return (error);
	timeout = timeout < now ? 0 : timeout - now;
	*sbttimeout = futex_queue_convert_timestamp_relative(timeout);
	*sbtprecision = futex_queue_convert_timestamp_relative(precision);
	return (0);
}
static int futex_queue_convert_timestamp ( struct thread * td , cloudabi_clockid_t clock_id , cloudabi_timestamp_t timeout , cloudabi_timestamp_t precision , sbintime_t * sbttimeout , sbintime_t * sbtprecision ) { cloudabi_timestamp_t now ; int error ; error = cloudabi_clock_time_get ( td , clock_id , & now ) ; if ( error != 0 ) return ( error ) ; timeout = timeout < now ? 0 : timeout - now ; * sbttimeout = futex_queue_convert_timestamp_relative ( timeout ) ; * sbtprecision = futex_queue_convert_timestamp_relative ( precision ) ; return ( 0 ) ; }
Converts an absolute timestamp and precision to a pair of sbintime values.
Converts an absolute timestamp and precision to a pair of sbintime values .
/* Make the time relative. */