Changeset 86ffa27f in mainline for uspace/lib/net/netif/netif_skel.c
- Timestamp:
- 2011-08-07T11:21:44Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- cc574511
- Parents:
- 15f3c3f (diff), e8067c0 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/net/netif/netif_skel.c
r15f3c3f r86ffa27f 228 228 } 229 229 230 /** Register the device notification receiver, 231 * 232 * Register a network interface layer module as the device 233 * notification receiver. 234 * 235 * @param[in] sess Session to the network interface layer module. 236 * 237 * @return EOK on success. 238 * @return ELIMIT if there is another module registered. 239 * 240 */ 241 static int register_message(async_sess_t *sess) 242 { 243 fibril_rwlock_write_lock(&netif_globals.lock); 244 if (netif_globals.nil_sess != NULL) { 245 fibril_rwlock_write_unlock(&netif_globals.lock); 246 return ELIMIT; 247 } 248 249 netif_globals.nil_sess = sess; 250 251 fibril_rwlock_write_unlock(&netif_globals.lock); 252 return EOK; 253 } 254 230 255 /** Process the netif module messages. 231 256 * … … 257 282 return EOK; 258 283 284 async_sess_t *callback = 285 async_callback_receive_start(EXCHANGE_SERIALIZE, call); 286 if (callback) 287 return register_message(callback); 288 259 289 switch (IPC_GET_IMETHOD(*call)) { 260 290 case NET_NETIF_PROBE: … … 358 388 * messages in an infinite loop. 359 389 * 360 * @param[in] nil_service Network interface layer service.361 *362 390 * @return EOK on success. 363 391 * @return Other error codes as defined for each specific module … … 365 393 * 366 394 */ 367 int netif_module_start( sysarg_t nil_service)395 int netif_module_start(void) 368 396 { 369 397 async_set_client_connection(netif_client_connection); 370 398 371 399 netif_globals.sess = connect_to_service(SERVICE_NETWORKING); 372 netif_globals.nil_sess = connect_to_service(nil_service);400 netif_globals.nil_sess = NULL; 373 401 netif_device_map_initialize(&netif_globals.device_map); 374 402
Note:
See TracChangeset
for help on using the changeset viewer.