* ppc-opc.c (powerpc_opcodes) <"lswx">: Use RAX for the second and
[binutils-gdb.git] / gdb / osf-share / cma_handle.h
blobd1bd646c4e9bc7c767cf9177c5e689c5a093e9be
1 /*
2 * (c) Copyright 1990-1996 OPEN SOFTWARE FOUNDATION, INC.
3 * (c) Copyright 1990-1996 HEWLETT-PACKARD COMPANY
4 * (c) Copyright 1990-1996 DIGITAL EQUIPMENT CORPORATION
5 * (c) Copyright 1991, 1992 Siemens-Nixdorf Information Systems
6 * To anyone who acknowledges that this file is provided "AS IS" without
7 * any express or implied warranty: permission to use, copy, modify, and
8 * distribute this file for any purpose is hereby granted without fee,
9 * provided that the above copyright notices and this notice appears in
10 * all source code copies, and that none of the names listed above be used
11 * in advertising or publicity pertaining to distribution of the software
12 * without specific, written prior permission. None of these organizations
13 * makes any representations about the suitability of this software for
14 * any purpose.
17 * Header file for handles
20 #ifndef CMA_HANDLE
21 #define CMA_HANDLE
24 * INCLUDE FILES
27 #include <cma_defs.h>
28 #include <cma_attr.h>
31 * CONSTANTS AND MACROS
34 #define cma__validate_attr(handle) \
35 ((cma__t_int_attr *)cma__validate_handle ( \
36 (cma_t_handle *)(handle), \
37 cma__c_obj_attr))
39 #define cma__validate_cv(handle) \
40 ((cma__t_int_cv *)cma__validate_handle ( \
41 (cma_t_handle *)(handle), \
42 cma__c_obj_cv))
44 #define cma__validate_mutex(handle) \
45 ((cma__t_int_mutex *)cma__validate_handle ( \
46 (cma_t_handle *)(handle), \
47 cma__c_obj_mutex))
49 #define cma__validate_tcb(handle) \
50 ((cma__t_int_tcb *)cma__validate_handle ( \
51 (cma_t_handle *)(handle), \
52 cma__c_obj_tcb))
54 #define cma__validate_stack(handle) \
55 ((cma__t_int_stack *)cma__validate_handle ( \
56 (cma_t_handle *)(handle), \
57 cma__c_obj_stack))
59 #define cma__validate_null_attr(handle) \
60 ((cma__t_int_attr *)cma__validate_handle_null ( \
61 (cma_t_handle *)(handle), \
62 cma__c_obj_attr))
64 #define cma__validate_null_cv(handle) \
65 ((cma__t_int_cv *)cma__validate_handle_null ( \
66 (cma_t_handle *)(handle), \
67 cma__c_obj_cv))
69 #define cma__validate_null_mutex(handle) \
70 ((cma__t_int_mutex *)cma__validate_handle_null ( \
71 (cma_t_handle *)(handle), \
72 cma__c_obj_mutex))
74 #define cma__validate_null_tcb(handle) \
75 ((cma__t_int_tcb *)cma__validate_handle_null ( \
76 (cma_t_handle *)(handle), \
77 cma__c_obj_tcb))
79 #define cma__validate_null_stack(handle) \
80 ((cma__t_int_stack *)cma__validate_handle_null ( \
81 (cma_t_handle *)(handle), \
82 cma__c_obj_stack))
84 #define cma__val_attr_stat(handle,obj) \
85 cma__val_hand_stat ( \
86 (cma_t_handle *)(handle), \
87 cma__c_obj_attr, \
88 (cma__t_object **)obj)
90 #define cma__val_cv_stat(handle,obj) \
91 cma__val_hand_stat ( \
92 (cma_t_handle *)(handle), \
93 cma__c_obj_cv, \
94 (cma__t_object **)obj)
96 #define cma__val_mutex_stat(handle,obj) \
97 cma__val_hand_stat ( \
98 (cma_t_handle *)(handle), \
99 cma__c_obj_mutex, \
100 (cma__t_object **)obj)
102 #define cma__val_tcb_stat(handle) \
103 cma__val_hand_stat ( \
104 (cma_t_handle *)(handle), \
105 cma__c_obj_tcb, \
106 (cma__t_object **)obj)
108 #define cma__val_stack_stat(handle,obj) \
109 cma__val_hand_stat ( \
110 (cma_t_handle *)(handle), \
111 cma__c_obj_stack, \
112 (cma__t_object **)obj)
114 #define cma__val_nullattr_stat(handle,obj) \
115 cma__val_handnull_stat ( \
116 (cma_t_handle *)(handle), \
117 cma__c_obj_attr, \
118 (cma__t_object **)obj)
120 #define cma__val_nullcv_stat(handle,obj) \
121 cma__val_handnull_stat ( \
122 (cma_t_handle *)(handle), \
123 cma__c_obj_cv, \
124 (cma__t_object **)obj)
126 #define cma__val_nullmutex_stat(handle,obj) \
127 cma__val_handnull_stat ( \
128 (cma_t_handle *)(handle), \
129 cma__c_obj_mutex, \
130 (cma__t_object **)obj)
132 #define cma__val_nulltcb_stat(handle,obj) \
133 cma__val_handnull_stat ( \
134 (cma_t_handle *)(handle), \
135 cma__c_obj_tcb, \
136 (cma__t_object **)obj)
138 #define cma__val_nullstack_stat(handle) \
139 cma__val_handnull_stat ( \
140 (cma_t_handle *)(handle), \
141 cma__c_obj_stack, \
142 (cma__t_object **)obj)
145 * TYPEDEFS
149 * Internal format of a handle (to the outside world it's an array of two
150 * addresses, but we know better).
152 typedef struct CMA__T_INT_HANDLE {
153 cma__t_object *pointer; /* Address of internal structure */
154 cma__t_short sequence; /* Sequence number of object */
155 cma__t_short type; /* Type code of object */
156 } cma__t_int_handle;
159 * GLOBAL DATA
163 * INTERNAL INTERFACES
166 extern void cma__clear_handle (cma_t_handle *);
168 extern void cma__object_to_handle (cma__t_object *, cma_t_handle *);
170 extern cma__t_int_attr * cma__validate_default_attr (cma_t_handle *);
172 extern cma_t_status cma__val_defattr_stat (cma_t_handle *, cma__t_int_attr **);
174 extern cma__t_object * cma__validate_handle (cma_t_handle *, cma_t_natural );
176 extern cma_t_status cma__val_hand_stat (cma_t_handle *,
177 cma_t_natural, cma__t_object **);
179 extern cma__t_object *cma__validate_handle_null (cma_t_handle *,
180 cma_t_natural);
182 extern cma_t_status cma__val_handnull_stat (cma_t_handle *,
183 cma_t_natural, cma__t_object **);
185 #endif