Rev 3443 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3443 | Rev 3452 | ||
---|---|---|---|
Line 35... | Line 35... | ||
35 | #include <stdio.h> |
35 | #include <stdio.h> |
36 | #include <stdlib.h> |
36 | #include <stdlib.h> |
37 | #include <ipc/ipc.h> |
37 | #include <ipc/ipc.h> |
38 | #include <libadt/hash_table.h> |
38 | #include <libadt/hash_table.h> |
39 | 39 | ||
- | 40 | #include "trace.h" |
|
40 | #include "proto.h" |
41 | #include "proto.h" |
41 | 42 | ||
42 | #define SRV_PROTO_TABLE_CHAINS 32 |
43 | #define SRV_PROTO_TABLE_CHAINS 32 |
43 | #define METHOD_OPER_TABLE_CHAINS 32 |
44 | #define METHOD_OPER_TABLE_CHAINS 32 |
44 | 45 | ||
Line 207... | Line 208... | ||
207 | static void oper_struct_init(oper_t *oper, char *name) |
208 | static void oper_struct_init(oper_t *oper, char *name) |
208 | { |
209 | { |
209 | oper->name = name; |
210 | oper->name = name; |
210 | } |
211 | } |
211 | 212 | ||
212 | oper_t *oper_new(char *name) |
213 | oper_t *oper_new(char *name, int argc, val_type_t *arg_types, |
- | 214 | val_type_t rv_type, int respc, val_type_t *resp_types) |
|
213 | { |
215 | { |
214 | oper_t *o; |
216 | oper_t *o; |
- | 217 | int i; |
|
215 | 218 | ||
216 | o = malloc(sizeof(oper_t)); |
219 | o = malloc(sizeof(oper_t)); |
217 | oper_struct_init(o, name); |
220 | oper_struct_init(o, name); |
218 | 221 | ||
- | 222 | o->argc = argc; |
|
- | 223 | for (i = 0; i < argc; i++) |
|
- | 224 | o->arg_type[i] = arg_types[i]; |
|
- | 225 | ||
- | 226 | o->rv_type = rv_type; |
|
- | 227 | ||
- | 228 | o->respc = respc; |
|
- | 229 | for (i = 0; i < respc; i++) |
|
- | 230 | o->resp_type[i] = resp_types[i]; |
|
- | 231 | ||
219 | return o; |
232 | return o; |
220 | } |
233 | } |
221 | 234 | ||
222 | /** @} |
235 | /** @} |
223 | */ |
236 | */ |