Changeset cf2af94 in mainline for uspace/srv/ns/service.c


Ignore:
Timestamp:
2011-02-09T11:46:47Z (14 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
cb15135a
Parents:
a49c4002 (diff), 0b37882 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

Local modifications:

  • change pipefs and ext2 to build again (use async_* calls instead of ipc_*)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/ns/service.c

    ra49c4002 rcf2af94  
    4343typedef struct {
    4444        link_t link;
    45         ipcarg_t service;        /**< Number of the service. */
    46         ipcarg_t phone;          /**< Phone registered with the service. */
    47         ipcarg_t in_phone_hash;  /**< Incoming phone hash. */
     45        sysarg_t service;        /**< Service ID. */
     46        sysarg_t phone;          /**< Phone registered with the service. */
     47        sysarg_t in_phone_hash;  /**< Incoming phone hash. */
    4848} hashed_service_t;
    4949
     
    5656 *
    5757 */
    58 static hash_index_t service_hash(unsigned long *key)
     58static hash_index_t service_hash(unsigned long key[])
    5959{
    6060        assert(key);
    61         return (*key % SERVICE_HASH_TABLE_CHAINS);
     61        return (key[0] % SERVICE_HASH_TABLE_CHAINS);
    6262}
    6363
     
    8686       
    8787        if (keys == 2)
    88                 return (key[1] == hs->in_phone_hash);
     88                return ((key[0] == hs->service) && (key[1] == hs->in_phone_hash));
    8989        else
    9090                return (key[0] == hs->service);
     
    115115typedef struct {
    116116        link_t link;
    117         ipcarg_t service;        /**< Number of the service. */
     117        sysarg_t service;        /**< Number of the service. */
    118118        ipc_callid_t callid;     /**< Call ID waiting for the connection */
    119         ipcarg_t arg2;           /**< Second argument */
    120         ipcarg_t arg3;           /**< Third argument */
     119        sysarg_t arg2;           /**< Second argument */
     120        sysarg_t arg3;           /**< Third argument */
    121121} pending_conn_t;
    122122
     
    174174 *
    175175 */
    176 int register_service(ipcarg_t service, ipcarg_t phone, ipc_call_t *call)
     176int register_service(sysarg_t service, sysarg_t phone, ipc_call_t *call)
    177177{
    178178        unsigned long keys[3] = {
     
    195195        hash_table_insert(&service_hash_table, keys, &hs->link);
    196196       
    197         return 0;
     197        return EOK;
    198198}
    199199
     
    207207 *
    208208 */
    209 void connect_to_service(ipcarg_t service, ipc_call_t *call, ipc_callid_t callid)
    210 {
    211         ipcarg_t retval;
     209void connect_to_service(sysarg_t service, ipc_call_t *call, ipc_callid_t callid)
     210{
     211        sysarg_t retval;
    212212        unsigned long keys[3] = {
    213213                service,
     
    227227                        }
    228228                       
     229                        link_initialize(&pr->link);
    229230                        pr->service = service;
    230231                        pr->callid = callid;
Note: See TracChangeset for help on using the changeset viewer.