8442 uts: startup_bios_disk() should check for BIOS
[unleashed.git] / include / sys / errorq.h
blob5ae6f9e9014747b5bdd2a4269d629730e5344ca4
1 /*
2 * CDDL HEADER START
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
7 * with the License.
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]
20 * CDDL HEADER END
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _ERRORQ_H
28 #define _ERRORQ_H
30 #include <sys/types.h>
31 #include <sys/time.h>
32 #include <sys/nvpair.h>
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
38 typedef struct errorq errorq_t;
39 typedef struct errorq_elem errorq_elem_t;
40 typedef void (*errorq_func_t)(void *, const void *, const errorq_elem_t *);
43 * Public flags for errorq_create(): bit range 0-15
45 #define ERRORQ_VITAL 0x0001 /* drain queue automatically on system reset */
48 * Public flags for errorq_dispatch():
50 #define ERRORQ_ASYNC 0 /* schedule async queue drain for caller */
51 #define ERRORQ_SYNC 1 /* do not schedule drain; caller will drain */
53 #ifdef _KERNEL
55 extern errorq_t *errorq_create(const char *, errorq_func_t, void *,
56 ulong_t, size_t, uint_t, uint_t);
58 extern errorq_t *errorq_nvcreate(const char *, errorq_func_t, void *,
59 ulong_t, size_t, uint_t, uint_t);
61 extern void errorq_destroy(errorq_t *);
62 extern void errorq_dispatch(errorq_t *, const void *, size_t, uint_t);
63 extern void errorq_drain(errorq_t *);
64 extern void errorq_init(void);
65 extern void errorq_panic(void);
66 extern errorq_elem_t *errorq_reserve(errorq_t *);
67 extern void errorq_commit(errorq_t *, errorq_elem_t *, uint_t);
68 extern void errorq_cancel(errorq_t *, errorq_elem_t *);
69 extern nvlist_t *errorq_elem_nvl(errorq_t *, const errorq_elem_t *);
70 extern nv_alloc_t *errorq_elem_nva(errorq_t *, const errorq_elem_t *);
71 extern void *errorq_elem_dup(errorq_t *, const errorq_elem_t *,
72 errorq_elem_t **);
73 extern void errorq_dump();
75 #endif /* _KERNEL */
77 #ifdef __cplusplus
79 #endif
81 #endif /* _ERRORQ_H */