Lines Matching refs:clock

35  *			alarm clock services. This file and the ipc
37 * machine-independent clock service layer.
48 #include <kern/clock.h>
65 * Actual clock alarm structure. Used for user clock_sleep() and
68 * chain of the target clock.
80 struct clock *clock; /* alarm clock */
86 #define al_clock al_alrm.clock
108 extern struct clock clock_list[];
127 clock_t clock,
164 * Macros to lock/unlock clock system.
177 clock_t clock;
185 * Configure clock devices.
188 clock = &clock_list[i];
189 if (clock->cl_ops && clock->cl_ops->c_config) {
190 if ((*clock->cl_ops->c_config)() == 0)
191 clock->cl_ops = NULL;
202 clock_t clock;
206 * Initialize basic clock structures.
209 clock = &clock_list[i];
210 if (clock->cl_ops && clock->cl_ops->c_init)
211 (*clock->cl_ops->c_init)();
216 * Initialize the clock ipc service facility.
221 clock_t clock;
225 * Initialize ipc clock services.
228 clock = &clock_list[i];
229 if (clock->cl_ops) {
230 ipc_clock_init(clock);
231 ipc_clock_enable(clock);
244 * Get the service port on a clock.
250 clock_t *clock) /* OUT */
253 *clock = CLOCK_NULL;
257 *clock = &clock_list[clock_id];
258 if ((*clock)->cl_ops == 0)
264 * Get the control port on a clock.
270 clock_t *clock) /* OUT */
274 *clock = CLOCK_NULL;
278 *clock = &clock_list[clock_id];
279 if ((*clock)->cl_ops == 0)
285 * Get the current clock time.
289 clock_t clock,
292 if (clock == CLOCK_NULL)
294 return ((*clock->cl_ops->c_gettime)(cur_time));
326 * Get clock attributes.
330 clock_t clock,
335 if (clock == CLOCK_NULL)
337 if (clock->cl_ops->c_getattr)
338 return (clock->cl_ops->c_getattr(flavor, attr, count));
396 * Set the current clock time.
400 clock_t clock,
403 if (clock == CLOCK_NULL)
409 * Set the clock alarm resolution.
413 clock_t clock,
418 if (clock == CLOCK_NULL)
424 * Setup a clock alarm.
428 clock_t clock,
440 if (clock == CLOCK_NULL)
442 if (clock != &clock_list[SYSTEM_CLOCK])
451 (*clock->cl_ops->c_gettime)(&clock_time);
461 * Get alarm and add to clock alarm list.
480 alarm->al_clock = clock;
489 * Sleep on a clock. System trap. User-level libmach clock_sleep
503 clock_t clock;
511 clock = &clock_list[SYSTEM_CLOCK];
513 clock = port_name_to_clock(clock_name);
521 rvalue = clock_sleep_internal(clock, sleep_type, &swtime);
534 clock_t clock,
544 if (clock == CLOCK_NULL)
547 if (clock != &clock_list[SYSTEM_CLOCK])
554 (*clock->cl_ops->c_gettime)(&clock_time);
564 * Get alarm and add to clock alarm list.
593 * clock alarm list. Return alarm to free list.
620 * Service clock alarm expirations.
625 clock_t clock;
632 clock = &clock_list[SYSTEM_CLOCK];
633 (*clock->cl_ops->c_gettime)(&clock_time);
636 * Update clock alarm list. Alarms that are due are moved
648 * clock alarm list.
803 clock_t clock = &clock_list[SYSTEM_CLOCK];
806 (void) (*clock->cl_ops->c_gettime)(&value);
814 clock_t clock = &clock_list[CALENDAR_CLOCK];
817 (void) (*clock->cl_ops->c_gettime)(&value);