Lines Matching refs:cwfds
491 void Curl_waitfds_init(struct curl_waitfds *cwfds, in Curl_waitfds_init() argument
495 DEBUGASSERT(cwfds); in Curl_waitfds_init()
497 memset(cwfds, 0, sizeof(*cwfds)); in Curl_waitfds_init()
498 cwfds->wfds = static_wfds; in Curl_waitfds_init()
499 cwfds->count = static_count; in Curl_waitfds_init()
502 static CURLcode cwfds_add_sock(struct curl_waitfds *cwfds, in cwfds_add_sock() argument
507 if(cwfds->n <= INT_MAX) { in cwfds_add_sock()
508 for(i = (int)cwfds->n - 1; i >= 0; --i) { in cwfds_add_sock()
509 if(sock == cwfds->wfds[i].fd) { in cwfds_add_sock()
510 cwfds->wfds[i].events |= events; in cwfds_add_sock()
516 if(cwfds->n >= cwfds->count) in cwfds_add_sock()
518 cwfds->wfds[cwfds->n].fd = sock; in cwfds_add_sock()
519 cwfds->wfds[cwfds->n].events = events; in cwfds_add_sock()
520 ++cwfds->n; in cwfds_add_sock()
524 CURLcode Curl_waitfds_add_ps(struct curl_waitfds *cwfds, in Curl_waitfds_add_ps() argument
529 DEBUGASSERT(cwfds); in Curl_waitfds_add_ps()
538 if(cwfds_add_sock(cwfds, ps->sockets[i], events)) in Curl_waitfds_add_ps()