Changeset 4e716180 in mainline for uspace/srv/net/udp/assoc.c
- Timestamp:
- 2013-05-03T21:14:39Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 716357f
- Parents:
- 1c7ba2d (diff), 5d1cb8a (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/srv/net/udp/assoc.c
r1c7ba2d r4e716180 279 279 280 280 fibril_mutex_lock(&assoc->lock); 281 while (list_empty(&assoc->rcv_queue) ) {281 while (list_empty(&assoc->rcv_queue) && !assoc->reset) { 282 282 log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_assoc_recv() - waiting"); 283 283 fibril_condvar_wait(&assoc->rcv_queue_cv, &assoc->lock); 284 } 285 286 if (assoc->reset) { 287 log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_assoc_recv() - association was reset"); 288 fibril_mutex_unlock(&assoc->lock); 289 return ECONNABORTED; 284 290 } 285 291 … … 323 329 } 324 330 331 /** Reset association. 332 * 333 * This causes any pendingreceive operations to return immediately with 334 * UDP_ERESET. 335 */ 336 void udp_assoc_reset(udp_assoc_t *assoc) 337 { 338 fibril_mutex_lock(&assoc->lock); 339 assoc->reset = true; 340 fibril_condvar_broadcast(&assoc->rcv_queue_cv); 341 fibril_mutex_unlock(&assoc->lock); 342 } 343 325 344 static int udp_assoc_queue_msg(udp_assoc_t *assoc, udp_sockpair_t *sp, 326 345 udp_msg_t *msg)
Note:
See TracChangeset
for help on using the changeset viewer.