Files | |
file | ns.c |
Naming service for HelenOS IPC. | |
Data Structures | |
struct | hashed_service_t |
Defines | |
#define | NAME "NS" |
#define | NS_HASH_TABLE_CHAINS 20 |
Functions | |
static int | register_service (ipcarg_t service, ipcarg_t phone, ipc_call_t *call) |
static int | connect_to_service (ipcarg_t service, ipc_call_t *call, ipc_callid_t callid) |
static hash_index_t | ns_hash (unsigned long *key) |
static int | ns_compare (unsigned long *key, hash_count_t keys, link_t *item) |
static void | ns_remove (link_t *item) |
static void | get_as (ipc_callid_t callid, ipc_call_t *call, char *name, void **addr) |
int | main (int argc, char **argv) |
int | ns_compare (unsigned long key[], hash_count_t keys, link_t *item) |
Variables | |
static hash_table_operations_t | ns_hash_table_ops |
static hash_table_t | ns_hash_table |
static void * | clockaddr = NULL |
static void * | klogaddr = NULL |
|
|
|
|
|
Register service.
Definition at line 161 of file ns.c. References hash_table_find(), hash_table_insert(), hashed_service_t::in_phone_hash, ipc_call_t::in_phone_hash, hashed_service_t::link, link_initialize(), ns_hash_table, hashed_service_t::phone, and hashed_service_t::service. Referenced by main(). Here is the call graph for this function: |
|
Connect client to service.
Definition at line 192 of file ns.c. References hash_table_find(), hash_table_get_instance, ipc_forward_fast(), ns_hash_table, and hashed_service_t::phone. Referenced by main(). Here is the call graph for this function: |
|
Compute hash index into NS hash table.
Definition at line 212 of file ns.c. References assert, and NS_HASH_TABLE_CHAINS. |
|
|
|
Perform actions after removal of item from the hash table.
Definition at line 251 of file ns.c. References assert, and hash_table_get_instance. |
|
Definition at line 86 of file ns.c. References as_get_mappable_page(), ipc_answer_fast(), map_physmem(), and sysinfo_value(). Referenced by main(). Here is the call graph for this function: |
|
Definition at line 102 of file ns.c. References clockaddr, connect_to_service(), get_as(), hash_table_create(), ipc_answer_fast(), ipc_wait_for_call(), klogaddr, ns_hash_table, NS_HASH_TABLE_CHAINS, ns_hash_table_ops, register_service(), SERVICE_MEM_KLOG, and SERVICE_MEM_REALTIME. Here is the call graph for this function: |
|
Compare a key with hashed item. This compare function always ignores the third key. It exists only to make it possible to remove records originating from connection with key[1] in_phone_hash value. Note that this is close to being classified as a nasty hack.
Definition at line 231 of file ns.c. References assert, hash_table_get_instance, hashed_service_t::in_phone_hash, and hashed_service_t::service. |
|
Initial value: { .hash = ns_hash, .compare = ns_compare, .remove_callback = ns_remove } Definition at line 66 of file ns.c. Referenced by main(). |
|
NS hash table structure. Definition at line 73 of file ns.c. Referenced by connect_to_service(), main(), and register_service(). |
|
Definition at line 83 of file ns.c. Referenced by main(). |
|
Definition at line 84 of file ns.c. Referenced by main(). |