Changeset 455f190 in mainline
- Timestamp:
- 2011-08-17T13:36:03Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2bc13887
- Parents:
- 26fbb7bb
- Location:
- uspace/lib/c
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/async.c
r26fbb7bb r455f190 201 201 { 202 202 async_client_data_destroy = dtor; 203 }204 205 void *async_get_client_data(void)206 {207 assert(fibril_connection);208 return fibril_connection->client->data;209 203 } 210 204 … … 626 620 free(client); 627 621 } 622 } 623 624 void *async_get_client_data(void) 625 { 626 assert(fibril_connection); 627 return fibril_connection->client->data; 628 } 629 630 void *async_get_client_data_by_hash(sysarg_t client_hash) 631 { 632 client_t *client = async_client_get(client_hash, false); 633 if (!client) 634 return NULL; 635 if (!client->data) { 636 async_client_put(client); 637 return NULL; 638 } 639 640 return client->data; 641 } 642 643 void async_put_client_data_by_hash(sysarg_t client_hash) 644 { 645 client_t *client = async_client_get(client_hash, false); 646 647 assert(client); 648 assert(client->data); 649 650 async_client_put(client); 628 651 } 629 652 -
uspace/lib/c/include/async.h
r26fbb7bb r455f190 186 186 extern void async_set_client_data_destructor(async_client_data_dtor_t); 187 187 extern void *async_get_client_data(void); 188 extern void *async_get_client_data_by_hash(sysarg_t); 189 extern void async_put_client_data_by_hash(sysarg_t); 188 190 189 191 extern void async_set_client_connection(async_client_conn_t);
Note:
See TracChangeset
for help on using the changeset viewer.