Changes in uspace/lib/net/netif/netif_skel.c [ee2fa30a:6b82009] in mainline
- File:
-
- 1 edited
-
uspace/lib/net/netif/netif_skel.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/net/netif/netif_skel.c
ree2fa30a r6b82009 228 228 } 229 229 230 /** Register the device notification receiver,231 *232 * Register a network interface layer module as the device233 * 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 255 230 /** Process the netif module messages. 256 231 * … … 282 257 return EOK; 283 258 284 async_sess_t *callback =285 async_callback_receive_start(EXCHANGE_SERIALIZE, call);286 if (callback)287 return register_message(callback);288 289 259 switch (IPC_GET_IMETHOD(*call)) { 290 260 case NET_NETIF_PROBE: … … 388 358 * messages in an infinite loop. 389 359 * 360 * @param[in] nil_service Network interface layer service. 361 * 390 362 * @return EOK on success. 391 363 * @return Other error codes as defined for each specific module … … 393 365 * 394 366 */ 395 int netif_module_start( void)367 int netif_module_start(sysarg_t nil_service) 396 368 { 397 369 async_set_client_connection(netif_client_connection); 398 370 399 371 netif_globals.sess = connect_to_service(SERVICE_NETWORKING); 400 netif_globals.nil_sess = NULL;372 netif_globals.nil_sess = connect_to_service(nil_service); 401 373 netif_device_map_initialize(&netif_globals.device_map); 402 374
Note:
See TracChangeset
for help on using the changeset viewer.
