4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
26 * Copyright (c) 1999-2001 by Sun Microsystems, Inc.
27 * All rights reserved.
30 #ifndef _COMPAT_OPENSOLARIS_SYS_CYCLIC_H_
31 #define _COMPAT_OPENSOLARIS_SYS_CYCLIC_H_
40 #include <sys/cpuvar.h>
45 typedef uintptr_t cyclic_id_t;
46 typedef int cyc_index_t;
47 typedef uint16_t cyc_level_t;
48 typedef void (*cyc_func_t)(void *);
49 typedef void *cyb_arg_t;
51 #define CYCLIC_NONE ((cyclic_id_t)0)
53 typedef struct cyc_handler {
58 typedef struct cyc_time {
60 hrtime_t cyt_interval;
63 typedef struct cyc_omni_handler {
64 void (*cyo_online)(void *, cpu_t *, cyc_handler_t *, cyc_time_t *);
65 void (*cyo_offline)(void *, cpu_t *, void *);
71 cyclic_id_t cyclic_add(cyc_handler_t *, cyc_time_t *);
72 cyclic_id_t cyclic_add_omni(cyc_omni_handler_t *);
73 void cyclic_remove(cyclic_id_t);