Changeset f302586 in mainline for uspace/lib/c/generic


Ignore:
Timestamp:
2012-01-14T23:31:26Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3ea725e, 8989f2a7, a1347a7
Parents:
6d8455d
Message:

make sure the client_connection is explicitly set at most once
it is not a mutable variable, it is a weak symbol

Location:
uspace/lib/c/generic
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/async.c

    r6d8455d rf302586  
    257257void async_set_client_data_constructor(async_client_data_ctor_t ctor)
    258258{
     259        assert(async_client_data_create == default_client_data_constructor);
    259260        async_client_data_create = ctor;
    260261}
     
    262263void async_set_client_data_destructor(async_client_data_dtor_t dtor)
    263264{
     265        assert(async_client_data_destroy == default_client_data_destructor);
    264266        async_client_data_destroy = dtor;
    265267}
     
    303305void async_set_client_connection(async_client_conn_t conn)
    304306{
     307        assert(client_connection == default_client_connection);
    305308        client_connection = conn;
    306309}
  • uspace/lib/c/generic/devman.c

    r6d8455d rf302586  
    177177
    178178/** Register running driver with device manager. */
    179 int devman_driver_register(const char *name, async_client_conn_t conn)
     179int devman_driver_register(const char *name)
    180180{
    181181        async_exch_t *exch = devman_exchange_begin_blocking(DEVMAN_DRIVER);
     
    192192        }
    193193       
    194         async_set_client_connection(conn);
    195        
    196194        exch = devman_exchange_begin(DEVMAN_DRIVER);
    197         async_connect_to_me(exch, 0, 0, 0, conn, NULL);
     195        async_connect_to_me(exch, 0, 0, 0, NULL, NULL);
    198196        devman_exchange_end(exch);
    199197       
  • uspace/lib/c/generic/loc.c

    r6d8455d rf302586  
    242242
    243243/** Register new driver with loc. */
    244 int loc_server_register(const char *name, async_client_conn_t conn)
     244int loc_server_register(const char *name)
    245245{
    246246        async_exch_t *exch = loc_exchange_begin_blocking(LOC_PORT_SUPPLIER);
     
    256256                return retval;
    257257        }
    258        
    259         async_set_client_connection(conn);
    260258       
    261259        exch = loc_exchange_begin(LOC_PORT_SUPPLIER);
Note: See TracChangeset for help on using the changeset viewer.