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.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
35 GRAPH_UPDATE_RELOAD_GRAPH
,
36 GRAPH_UPDATE_ADD_INSTANCE
,
37 GRAPH_UPDATE_STATE_CHANGE
40 typedef struct protocol_states
{
41 restarter_instance_state_t ps_state
;
42 restarter_instance_state_t ps_state_next
;
43 restarter_error_t ps_err
;
44 restarter_str_t ps_reason
;
48 typedef struct graph_protocol_event
{
51 graph_event_type_t gpe_type
;
52 protocol_states_t
*gpe_data
;
54 uu_list_node_t gpe_link
;
55 pthread_mutex_t gpe_lock
;
56 } graph_protocol_event_t
;
58 typedef struct graph_update
{
59 pthread_mutex_t gu_lock
;
63 pthread_mutex_t gu_freeze_lock
;
64 pthread_cond_t gu_freeze_cv
;
68 typedef struct restarter_protocol_event
{
70 restarter_event_type_t rpe_type
;
73 uu_list_node_t rpe_link
;
74 } restarter_protocol_event_t
;
76 typedef struct restarter_update
{
77 pthread_mutex_t restarter_update_lock
;
78 pthread_cond_t restarter_update_cv
;
79 int restarter_update_wakeup
;
82 extern restarter_update_t
*ru
;
83 extern graph_update_t
*gu
;
85 void graph_protocol_init();
86 void graph_protocol_send_event(const char *, graph_event_type_t
,
88 graph_protocol_event_t
*graph_event_dequeue();
89 void graph_event_requeue(graph_protocol_event_t
*);
90 void graph_event_release(graph_protocol_event_t
*);
92 void restarter_protocol_init();
93 evchan_t
*restarter_protocol_init_delegate(char *);
94 void restarter_protocol_send_event(const char *, evchan_t
*,
95 restarter_event_type_t
, int32_t);
96 restarter_protocol_event_t
*restarter_event_dequeue();
97 void restarter_event_requeue(restarter_protocol_event_t
*);
98 void restarter_event_release(restarter_protocol_event_t
*);
104 #endif /* _PROTOCOL_H */