Deleted Added
full compact
kernel.c (289562) kernel.c (297508)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 352 unchanged lines hidden (view full) ---

361clock_t
362cv_timedwait_hires(kcondvar_t *cv, kmutex_t *mp, hrtime_t tim, hrtime_t res,
363 int flag)
364{
365 int error;
366 timestruc_t ts;
367 hrtime_t delta;
368
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 352 unchanged lines hidden (view full) ---

361clock_t
362cv_timedwait_hires(kcondvar_t *cv, kmutex_t *mp, hrtime_t tim, hrtime_t res,
363 int flag)
364{
365 int error;
366 timestruc_t ts;
367 hrtime_t delta;
368
369 ASSERT(flag == 0);
369 ASSERT(flag == 0 || flag == CALLOUT_FLAG_ABSOLUTE);
370
371top:
370
371top:
372 delta = tim - gethrtime();
372 delta = tim;
373 if (flag & CALLOUT_FLAG_ABSOLUTE)
374 delta -= gethrtime();
375
373 if (delta <= 0)
374 return (-1);
375
376 ts.tv_sec = delta / NANOSEC;
377 ts.tv_nsec = delta % NANOSEC;
378
379 ASSERT(mutex_owner(mp) == curthread);
380 mp->m_owner = NULL;

--- 822 unchanged lines hidden ---
376 if (delta <= 0)
377 return (-1);
378
379 ts.tv_sec = delta / NANOSEC;
380 ts.tv_nsec = delta % NANOSEC;
381
382 ASSERT(mutex_owner(mp) == curthread);
383 mp->m_owner = NULL;

--- 822 unchanged lines hidden ---