Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2945 → Rev 2946

/branches/tracing/uspace/app/sctrace/proto.c
56,12 → 56,34
link_t link;
} method_oper_t;
 
hash_index_t srv_proto_hash(unsigned long key[])
static hash_index_t srv_proto_hash(unsigned long key[]);
static int srv_proto_compare(unsigned long key[], hash_count_t keys,
link_t *item);
static void srv_proto_remove_callback(link_t *item);
 
hash_table_operations_t srv_proto_ops = {
.hash = srv_proto_hash,
.compare = srv_proto_compare,
.remove_callback = srv_proto_remove_callback
};
 
static hash_index_t method_oper_hash(unsigned long key[]);
static int method_oper_compare(unsigned long key[], hash_count_t keys,
link_t *item);
static void method_oper_remove_callback(link_t *item);
 
hash_table_operations_t method_oper_ops = {
.hash = method_oper_hash,
.compare = method_oper_compare,
.remove_callback = method_oper_remove_callback
};
 
static hash_index_t srv_proto_hash(unsigned long key[])
{
return key[0] % SRV_PROTO_TABLE_CHAINS;
}
 
int srv_proto_compare(unsigned long key[], hash_count_t keys,
static int srv_proto_compare(unsigned long key[], hash_count_t keys,
link_t *item)
{
srv_proto_t *sp;
71,22 → 93,16
return key[0] == sp->srv;
}
 
void srv_proto_remove_callback(link_t *item)
static void srv_proto_remove_callback(link_t *item)
{
}
 
hash_table_operations_t srv_proto_ops = {
.hash = srv_proto_hash,
.compare = srv_proto_compare,
.remove_callback = srv_proto_remove_callback
};
 
hash_index_t method_oper_hash(unsigned long key[])
static hash_index_t method_oper_hash(unsigned long key[])
{
return key[0] % METHOD_OPER_TABLE_CHAINS;
}
 
int method_oper_compare(unsigned long key[], hash_count_t keys,
static int method_oper_compare(unsigned long key[], hash_count_t keys,
link_t *item)
{
method_oper_t *mo;
96,17 → 112,11
return key[0] == mo->method;
}
 
void method_oper_remove_callback(link_t *item)
static void method_oper_remove_callback(link_t *item)
{
}
 
hash_table_operations_t method_oper_ops = {
.hash = method_oper_hash,
.compare = method_oper_compare,
.remove_callback = method_oper_remove_callback
};
 
 
void proto_init(void)
{
hash_table_create(&srv_proto, SRV_PROTO_TABLE_CHAINS, 1,