Lines Matching refs:pss

85 			     pss, mi->same_mi_pss_list) {
86 lws_rx_flow_control(pss->wsi, enable);
87 } lws_end_foreach_ll(pss, same_mi_pss_list);
123 pss, mi->same_mi_pss_list) {
125 &pss->tail);
128 worst_tail = pss->tail;
129 worst_pss = pss;
131 } lws_end_foreach_ll(pss, same_mi_pss_list);
158 pss, mi->same_mi_pss_list) {
159 if (pss->tail == worst_tail)
166 lws_set_timeout(pss->wsi,
168 } lws_end_foreach_ll(pss, same_mi_pss_list);
178 pss, mi->same_mi_pss_list) {
179 lws_callback_on_writable(pss->wsi);
180 } lws_end_foreach_ll(pss, same_mi_pss_list);
197 struct per_session_data__lws_mirror *pss =
281 /* add our pss to list of guys bound to this mi */
283 lws_ll_fwd_insert(pss, same_mi_pss_list, mi->same_mi_pss_list);
285 /* init the pss */
287 pss->mi = mi;
288 pss->tail = lws_ring_get_oldest_tail(mi->ring);
289 pss->wsi = wsi;
299 /* detach our pss from the mirror instance */
300 mi = pss->mi;
306 /* remove our closing pss from its mirror instance list */
308 same_mi_pss_list, pss, mi->same_mi_pss_list);
309 pss->mi = NULL;
313 * Still other pss using the mirror instance. The pss
315 * using the remaining pss what is the current oldest
326 /* No more pss using the mirror instance... delete mi */
366 lws_pthread_mutex_lock(&pss->mi->lock); /* instance lock { */
367 oldest_tail = lws_ring_get_oldest_tail(pss->mi->ring);
368 update_worst = oldest_tail == pss->tail;
372 msg = lws_ring_get_element(pss->mi->ring, &pss->tail);
378 " pss->tail = %d\n", __func__,
379 oldest_tail, pss->tail);
380 if (lws_ring_consume(pss->mi->ring, &pss->tail,
394 lws_ring_consume(pss->mi->ring, &pss->tail, NULL, 1);
399 if (lws_ring_get_count_waiting_elements(pss->mi->ring,
400 &pss->tail))
411 lws_set_timeout(pss->wsi, NO_PENDING_TIMEOUT, 0);
417 __mirror_update_worst_tail(pss->mi);
420 lws_pthread_mutex_unlock(&pss->mi->lock); /* } instance lock */
424 lws_pthread_mutex_unlock(&pss->mi->lock); /* } instance lock */
429 lws_pthread_mutex_lock(&pss->mi->lock); /* mi lock { */
430 n = (int)lws_ring_get_count_free_elements(pss->mi->ring);
433 if (pss->mi->rx_enabled)
434 __mirror_rxflow_instance(pss->mi, 0);
446 if (!lws_ring_insert(pss->mi->ring, &amsg, 1)) {
449 if (pss->mi->rx_enabled)
450 __mirror_rxflow_instance(pss->mi, 0);
454 if (pss->mi->rx_enabled &&
455 lws_ring_get_count_free_elements(pss->mi->ring) <
457 __mirror_rxflow_instance(pss->mi, 0);
460 __mirror_callback_all_in_mi_on_writable(pss->mi);
463 lws_pthread_mutex_unlock(&pss->mi->lock); /* } mi lock */