Changeset a1347a7 in mainline for uspace/lib/c/generic
- Timestamp:
- 2012-01-15T13:51:09Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bd79281
- Parents:
- 03e0a244 (diff), f302586 (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. - Location:
- uspace/lib/c/generic
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/async.c
r03e0a244 ra1347a7 257 257 void async_set_client_data_constructor(async_client_data_ctor_t ctor) 258 258 { 259 assert(async_client_data_create == default_client_data_constructor); 259 260 async_client_data_create = ctor; 260 261 } … … 262 263 void async_set_client_data_destructor(async_client_data_dtor_t dtor) 263 264 { 265 assert(async_client_data_destroy == default_client_data_destructor); 264 266 async_client_data_destroy = dtor; 265 267 } … … 303 305 void async_set_client_connection(async_client_conn_t conn) 304 306 { 307 assert(client_connection == default_client_connection); 305 308 client_connection = conn; 306 309 } -
uspace/lib/c/generic/device/nic.c
r03e0a244 ra1347a7 44 44 #include <ipc/services.h> 45 45 46 /** Send a packet through the device 47 * 48 * @param[in] dev_sess 49 * @param[in] packet_id Id of the sent packet 50 * 51 * @return EOK If the operation was successfully completed 52 * 53 */ 54 int nic_send_message(async_sess_t *dev_sess, packet_id_t packet_id) 55 { 56 async_exch_t *exch = async_exchange_begin(dev_sess); 57 int rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE), 58 NIC_SEND_MESSAGE, packet_id); 59 async_exchange_end(exch); 60 61 return rc; 46 /** Send frame from NIC 47 * 48 * @param[in] dev_sess 49 * @param[in] data Frame data 50 * @param[in] size Frame size in bytes 51 * 52 * @return EOK If the operation was successfully completed 53 * 54 */ 55 int nic_send_frame(async_sess_t *dev_sess, void *data, size_t size) 56 { 57 async_exch_t *exch = async_exchange_begin(dev_sess); 58 59 ipc_call_t answer; 60 aid_t req = async_send_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE), 61 NIC_SEND_MESSAGE, &answer); 62 sysarg_t retval = async_data_write_start(exch, data, size); 63 64 async_exchange_end(exch); 65 66 if (retval != EOK) { 67 async_wait_for(req, NULL); 68 return retval; 69 } 70 71 async_wait_for(req, &retval); 72 return retval; 62 73 } 63 74 -
uspace/lib/c/generic/devman.c
r03e0a244 ra1347a7 177 177 178 178 /** Register running driver with device manager. */ 179 int devman_driver_register(const char *name , async_client_conn_t conn)179 int devman_driver_register(const char *name) 180 180 { 181 181 async_exch_t *exch = devman_exchange_begin_blocking(DEVMAN_DRIVER); … … 192 192 } 193 193 194 async_set_client_connection(conn);195 196 194 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); 198 196 devman_exchange_end(exch); 199 197 -
uspace/lib/c/generic/loc.c
r03e0a244 ra1347a7 242 242 243 243 /** Register new driver with loc. */ 244 int loc_server_register(const char *name , async_client_conn_t conn)244 int loc_server_register(const char *name) 245 245 { 246 246 async_exch_t *exch = loc_exchange_begin_blocking(LOC_PORT_SUPPLIER); … … 256 256 return retval; 257 257 } 258 259 async_set_client_connection(conn);260 258 261 259 exch = loc_exchange_begin(LOC_PORT_SUPPLIER);
Note:
See TracChangeset
for help on using the changeset viewer.