Changeset 23882034 in mainline


Ignore:
Timestamp:
2011-01-25T23:41:18Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b75e929
Parents:
8526e585
Message:

Provide means of obtaining one's own client data.

Location:
uspace/lib/c
Files:
2 edited

Legend:

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

    r8526e585 r23882034  
    151151        sysarg_t in_phone_hash;
    152152       
     153        /** Link to the client tracking structure. */
     154        client_t *client;
     155
    153156        /** Messages that should be delivered to this fibril. */
    154157        link_t msg_queue;
     
    191194{
    192195        async_client_data_destroy = dtor;
     196}
     197
     198void *async_client_data_get(void)
     199{
     200        assert(FIBRIL_connection);
     201
     202        return FIBRIL_connection->client->data;
    193203}
    194204
     
    574584        }
    575585        futex_up(&async_futex);
     586
     587        FIBRIL_connection->client = cl;
    576588
    577589        /*
  • uspace/lib/c/include/async.h

    r8526e585 r23882034  
    104104extern void async_set_client_data_constructor(async_client_data_ctor_t);
    105105extern void async_set_client_data_destructor(async_client_data_dtor_t);
     106
     107extern void *async_client_data_get(void);
    106108
    107109extern void async_set_client_connection(async_client_conn_t);
Note: See TracChangeset for help on using the changeset viewer.