Changeset 00d7e1b in mainline for uspace/lib/c/generic/device/nic.c
- Timestamp:
- 2011-10-07T20:20:33Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 49bd793b
- Parents:
- e2c50e1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/device/nic.c
re2c50e1 r00d7e1b 137 137 138 138 async_exch_t *exch = async_exchange_begin(dev_sess); 139 140 int rc = async_req_1_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE), NIC_GET_ADDRESS);141 i f (rc != EOK) {142 143 return rc;144 }145 146 rc = async_data_read_start(exch, address, sizeof(nic_address_t));147 148 async_exchange_end(exch);149 150 return rc;139 aid_t aid = async_send_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE), 140 NIC_GET_ADDRESS, NULL); 141 int rc = async_data_read_start(exch, address, sizeof(nic_address_t)); 142 async_exchange_end(exch); 143 144 sysarg_t res; 145 async_wait_for(aid, &res); 146 147 if (rc != EOK) 148 return rc; 149 150 return (int) res; 151 151 } 152 152 … … 164 164 165 165 async_exch_t *exch = async_exchange_begin(dev_sess); 166 aid_t message_id = async_send_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),166 aid_t aid = async_send_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE), 167 167 NIC_SET_ADDRESS, NULL); 168 168 int rc = async_data_write_start(exch, address, sizeof(nic_address_t)); … … 170 170 171 171 sysarg_t res; 172 async_wait_for( message_id, &res);172 async_wait_for(aid, &res); 173 173 174 174 if (rc != EOK)
Note:
See TracChangeset
for help on using the changeset viewer.