Home
last modified time | relevance | path

Searched refs:th (Results 1 – 25 of 84) sorted by relevance

1234

/xnu-11215/bsd/netinet/
H A Dtcp_input.c2114 th->th_seq, th->th_ack, th->th_win); in tcp_input()
2171 th->th_seq, th->th_ack, th->th_win); in tcp_input()
2477 th->th_dport, th->th_sport, &ip6->ip6_dst, in tcp_input()
2583 if (th->th_dport == th->th_sport) { in tcp_input()
2902 th->th_seq, th->th_ack, tlen, thflags, in tcp_input()
3417 th->th_seq, th->th_ack, th->th_win); in tcp_input()
3421 th->th_seq, th->th_ack, th->th_win); in tcp_input()
5660 if (SEQ_GT(th->th_seq + th->th_urp, tp->rcv_up)) { in tcp_input()
5661 tp->rcv_up = th->th_seq + th->th_urp; in tcp_input()
5862 th->th_seq, th->th_ack, th->th_win); in tcp_input()
[all …]
H A Dtcp_newreno.c81 void tcp_newreno_ack_rcvd(struct tcpcb *tp, struct tcphdr *th);
83 void tcp_newreno_post_fr(struct tcpcb *tp, struct tcphdr *th);
86 int tcp_newreno_delay_ack(struct tcpcb *tp, struct tcphdr *th);
143 acked = BYTES_ACKED(th, tp); in tcp_newreno_congestion_avd()
159 tcp_newreno_ack_rcvd(struct tcpcb *tp, struct tcphdr *th) in tcp_newreno_ack_rcvd() argument
178 acked = BYTES_ACKED(th, tp); in tcp_newreno_ack_rcvd()
219 tcp_newreno_post_fr(struct tcpcb *tp, struct tcphdr *th) in tcp_newreno_post_fr() argument
223 if (th) { in tcp_newreno_post_fr()
224 ss = tp->snd_max - th->th_ack; in tcp_newreno_post_fr()
312 tcp_newreno_delay_ack(struct tcpcb *tp, struct tcphdr *th) in tcp_newreno_delay_ack() argument
[all …]
H A Dtcp_log.h99 extern void tcp_log_drop_pkt(void *hdr, struct tcphdr *th, struct ifnet *ifp, const char *reason);
197 #define TCP_LOG_DROP_NECP(hdr, th, tp, outgoing) if (tcp_is_log_enabled(tp, TLEF_DROP_NECP)) \ argument
198 tcp_log_drop_pcb((hdr), (th), (tp), (outgoing), "NECP")
200 #define TCP_LOG_DROP_PCB(hdr, th, tp, outgoing, reason) if (tcp_is_log_enabled(tp, TLEF_DROP_PCB)) \ argument
201 tcp_log_drop_pcb((hdr), (th), (tp), (outgoing), reason)
203 #define TCP_LOG_TH_FLAGS(hdr, th, tp, outgoing, ifp) \ argument
204 if ((th) != NULL && ((th)->th_flags & (TH_SYN|TH_FIN|TH_RST))) \
205 tcp_log_th_flags((hdr), (th), (tp), (outgoing), (ifp))
207 #define TCP_LOG_DROP_PKT(hdr, th, ifp, reason) \ argument
208 if ((th) != NULL && ((th->th_flags) & (TH_SYN|TH_FIN|TH_RST)) && \
[all …]
H A Dtcp_cubic.c236 tcp_cubic_tcpwin(struct tcpcb *tp, struct tcphdr *th) in tcp_cubic_tcpwin() argument
293 tp->t_bytes_acked += BYTES_ACKED(th, tp); in tcp_cubic_congestion_avd()
304 tcp_win = tcp_cubic_tcpwin(tp, th); in tcp_cubic_congestion_avd()
357 tcp_cubic_ack_rcvd(struct tcpcb *tp, struct tcphdr *th) in tcp_cubic_ack_rcvd() argument
366 tcp_cubic_congestion_avd(tp, th); in tcp_cubic_ack_rcvd()
374 acked = BYTES_ACKED(th, tp); in tcp_cubic_ack_rcvd()
480 tcp_cubic_post_fr(struct tcpcb *tp, struct tcphdr *th) in tcp_cubic_post_fr() argument
485 if (th != NULL) { in tcp_cubic_post_fr()
486 ack = th->th_ack; in tcp_cubic_post_fr()
580 tcp_cubic_delay_ack(struct tcpcb *tp, struct tcphdr *th) in tcp_cubic_delay_ack() argument
[all …]
H A Dtcp_ledbat.c57 void tcp_ledbat_ack_rcvd(struct tcpcb *tp, struct tcphdr *th);
60 void tcp_ledbat_post_fr(struct tcpcb *tp, struct tcphdr *th);
194 tcp_ledbat_congestion_avd(struct tcpcb *tp, struct tcphdr *th) in tcp_ledbat_congestion_avd() argument
199 acked = BYTES_ACKED(th, tp); in tcp_ledbat_congestion_avd()
377 tcp_ledbat_ack_rcvd(struct tcpcb *tp, struct tcphdr *th) in tcp_ledbat_ack_rcvd() argument
396 acked = BYTES_ACKED(th, tp); in tcp_ledbat_ack_rcvd()
459 tcp_ledbat_post_fr(struct tcpcb *tp, struct tcphdr *th) in tcp_ledbat_post_fr() argument
463 if (th) { in tcp_ledbat_post_fr()
464 ss = tp->snd_max - th->th_ack; in tcp_ledbat_post_fr()
538 tcp_ledbat_delay_ack(struct tcpcb *tp, struct tcphdr *th) in tcp_ledbat_delay_ack() argument
[all …]
H A Dtcp_prague.c36 static void tcp_prague_post_fr(struct tcpcb *tp, struct tcphdr *th);
157 reno_friendly_win(struct tcpcb *tp, struct tcphdr *th) in reno_friendly_win() argument
165 tp->t_ccstate->reno_acked = BYTES_ACKED(th, tp); in reno_friendly_win()
167 tp->t_ccstate->reno_acked += BYTES_ACKED(th, tp); in reno_friendly_win()
213 uint32_t reno_win = reno_friendly_win(tp, th); in tcp_cubic_ack_ca()
246 tcp_prague_ack_rcvd(struct tcpcb *tp, struct tcphdr *th) in tcp_prague_ack_rcvd() argument
264 tcp_cubic_ack_ca(tp, th, acked); in tcp_prague_ack_rcvd()
327 tcp_prague_post_fr(struct tcpcb *tp, __unused struct tcphdr *th) in tcp_prague_post_fr() argument
563 if (!rtt_elapsed(tp->t_ccstate->snd_nxt_cwr, th->th_ack)) { in tcp_prague_process_ecn()
690 tcp_prague_delay_ack(struct tcpcb *tp, struct tcphdr *th) in tcp_prague_delay_ack() argument
[all …]
H A Dtcp_cc.h198 void (*congestion_avd) (struct tcpcb *tp, struct tcphdr *th);
201 void (*ack_rcvd) (struct tcpcb *tp, struct tcphdr *th);
207 void (*post_fr) (struct tcpcb *tp, struct tcphdr *th);
216 int (*delay_ack)(struct tcpcb *tp, struct tcphdr *th);
219 …void (*process_ecn) (struct tcpcb *tp, struct tcphdr *th, uint32_t new_bytes_marked, uint32_t pack…
258 void (*data_rcvd) (struct tcpcb *tp, struct tcphdr *th,
276 extern int tcp_cc_delay_ack(struct tcpcb *tp, struct tcphdr *th);
H A Dtcp_log.c690 thflags = th->th_flags; in tcp_log_pkt_addresses()
790 local_port = th->th_sport; in tcp_log_drop_pcb()
794 local_port = th->th_dport; in tcp_log_drop_pcb()
891 thflags = th->th_flags; in tcp_log_th_flags()
898 local_port = th->th_sport; in tcp_log_th_flags()
899 foreign_port = th->th_dport; in tcp_log_th_flags()
901 local_port = th->th_dport; in tcp_log_th_flags()
902 foreign_port = th->th_sport; in tcp_log_th_flags()
961 local_port = th->th_dport; in tcp_log_drop_pkt()
962 foreign_port = th->th_sport; in tcp_log_drop_pkt()
[all …]
H A Dtcp_sack.c433 tcp_seq old_snd_fack = 0, th_ack = th->th_ack; in tcp_sack_doack()
700 tcp_sack_partialack(struct tcpcb *tp, struct tcphdr *th) in tcp_sack_partialack() argument
713 if (SEQ_LT(tp->snd_nxt, th->th_ack)) { in tcp_sack_partialack()
714 tp->snd_nxt = th->th_ack; in tcp_sack_partialack()
717 if (((BYTES_ACKED(th, tp)) / tp->t_maxseg) > 2) { in tcp_sack_partialack()
726 tp->snd_fack == th->th_ack && TAILQ_EMPTY(&tp->snd_holes)) { in tcp_sack_partialack()
896 struct tcphdr *th, boolean_t *dsack_tlp) in tcp_sack_process_dsack() argument
911 if (SEQ_LT(first_sack.start, th->th_ack) && in tcp_sack_process_dsack()
912 SEQ_LEQ(first_sack.end, th->th_ack)) { in tcp_sack_process_dsack()
948 th->th_ack)) { in tcp_sack_process_dsack()
[all …]
/xnu-11215/tests/
H A Dselect_stress.c163 struct thread_sync_arg *th; member
218 struct endpoint *ep = &sarg->th[i].ep; in do_select()
239 struct thread_sync_arg *th; in test_select_stress() local
249 th = calloc(nthreads, sizeof(*th)); in test_select_stress()
251 T_ASSERT_NOTNULL(th, "select_stress: No memory for thread endpoints"); in test_select_stress()
260 struct endpoint *e = &th[i].ep; in test_select_stress()
261 th[i].setup = setup_stress_event; in test_select_stress()
262 th[i].work = do_stress_events; in test_select_stress()
265 T_ASSERT_POSIX_ZERO(pthread_create(&e->pth, 0, thread_sync, &th[i]), in test_select_stress()
301 struct endpoint *ep = &th[i].ep; in test_select_stress()
[all …]
H A Drestartable_ranges.c145 pthread_t th;
154 rc = pthread_create(&th, NULL, &task_restartable_ranges_thread, &step);
166 pthread_join(th, NULL);
170 rc = pthread_create(&th, NULL, &task_restartable_ranges_thread, &step);
176 rc = pthread_kill(th, SIGUSR1);
182 pthread_join(th, NULL);
236 pthread_t th;
H A Dfd.c29 pthread_t th; variable
34 pthread_create(&th, NULL, fd_select_close_helper, pair);
85 pthread_t th[4]; variable
89 rc = pthread_create(&th[i], NULL,
95 pthread_join(th[i], NULL);
H A Dmcast_group_race_82820812.c35 pthread_t th; variable
53 T_ASSERT_POSIX_ZERO(pthread_create(&th, NULL, thread_func, NULL), "pthread_create");
61 T_ASSERT_POSIX_ZERO(pthread_join(th, NULL), "pthread_join");
/xnu-11215/osfmk/kern/
H A Dbsd_kern.c143 return th->t_tro; in get_thread_ro_unchecked()
147 get_thread_ro(thread_t th) in get_thread_ro() argument
149 thread_ro_t tro = th->t_tro; in get_thread_ro()
152 if (tro->tro_owner != th) { in get_thread_ro()
849 get_threadtask(thread_t th) in get_threadtask() argument
858 if (th == THREAD_NULL || th->t_tro == NULL) { in get_threadtask_early()
862 return get_threadtask(th); in get_threadtask_early()
976 thread_t th) in get_thread_userstop() argument
997 thread_t th) in thread_should_abort() argument
1023 thread_lock(th); in current_thread_aborted()
[all …]
H A Dthread.h1163 #define thread_lock_init(th) simple_lock_init(&(th)->sched_lock, 0) argument
1164 #define thread_lock(th) simple_lock(&(th)->sched_lock, &thread_lck_grp) argument
1165 #define thread_unlock(th) simple_unlock(&(th)->sched_lock) argument
1166 #define thread_lock_assert(th, x) simple_lock_assert(&(th)->sched_lock, (x)) argument
1168 #define wake_lock_init(th) simple_lock_init(&(th)->wake_lock, 0) argument
1169 #define wake_lock(th) simple_lock(&(th)->wake_lock, &thread_lck_grp) argument
1170 #define wake_unlock(th) simple_unlock(&(th)->wake_lock) argument
1855 thread_get_thread_name(thread_t th, char* name);
1944 extern boolean_t thread_has_thread_name(thread_t th);
1955 extern void thread_set_thread_name(thread_t th, const char* name);
/xnu-11215/osfmk/ipc/
H A Dipc_mqueue.c236 thread_t th; in ipc_mqueue_add_locked() local
242 if (th == THREAD_NULL) { in ipc_mqueue_add_locked()
276 th->ith_option, th); in ipc_mqueue_add_locked()
294 tsize = ipc_kmsg_trailer_size(th->ith_option, th->map); in ipc_mqueue_add_locked()
298 &th->ith_recv_bufs)) { in ipc_mqueue_add_locked()
300 th->ith_msize = msize; in ipc_mqueue_add_locked()
301 th->ith_asize = asize; in ipc_mqueue_add_locked()
307 th->ith_kmsg = IKM_NULL; in ipc_mqueue_add_locked()
308 th->ith_seqno = 0; in ipc_mqueue_add_locked()
316 th->ith_state = MACH_MSG_SUCCESS; in ipc_mqueue_add_locked()
[all …]
/xnu-11215/tests/ipc/
H A Dipc_thread_ports_race.c36 pthread_t th[BATCH]; in thread_creation_bomb_one() local
39 int rc = pthread_create(&th[i], NULL, thread_do_nothing, NULL); in thread_creation_bomb_one()
44 int rc = pthread_join(th[i], NULL); in thread_creation_bomb_one()
99 pthread_t th; in local_test() local
102 rc = pthread_create(&th, NULL, thread_creation_bomb, NULL); in local_test()
107 rc = pthread_join(th, NULL); in local_test()
/xnu-11215/san/coverage/
H A Dkcov_stksz.c117 kcov_stksz_update_stack_size(thread_t th, kcov_thread_data_t *kcdata, void *caller, uintptr_t sp) in kcov_stksz_update_stack_size() argument
123 vm_offset_t stack_base = kcov_stksz_get_thread_stkbase(th); in kcov_stksz_update_stack_size()
124 vm_offset_t stack_size = kcov_stksz_get_thread_stksize(th); in kcov_stksz_update_stack_size()
142 if (dtrace_get_thread_inprobe(th) == 0) { in kcov_stksz_update_stack_size()
153 if (dtrace_get_thread_inprobe(th) == 0) { in kcov_stksz_update_stack_size()
167 if (dtrace_get_thread_inprobe(th) == 0) { in kcov_stksz_update_stack_size()
H A Dkcov.c212 thread_t th = current_thread(); in trace_pc_guard() local
213 if (__improbable(th == THREAD_NULL)) { in trace_pc_guard()
219 kcov_thread_data_t *data = kcov_get_thread_data(th); in trace_pc_guard()
231 kcov_stksz_update_stack_size(th, data, caller, sp); in trace_pc_guard()
/xnu-11215/bsd/skywalk/nexus/flowswitch/flow/
H A Dflow_track.c758 struct tcphdr *th; in flow_track_abort_tcp() local
830 th->th_ack = 0; in flow_track_abort_tcp()
831 th->th_flags = TH_RST; in flow_track_abort_tcp()
834 th->th_seq = 0; in flow_track_abort_tcp()
837 th->th_flags = TH_RST | TH_ACK; in flow_track_abort_tcp()
846 th->th_sport = fe->fe_key.fk_sport; in flow_track_abort_tcp()
849 th->th_ack = 0; in flow_track_abort_tcp()
850 th->th_flags = TH_RST; in flow_track_abort_tcp()
852 th->th_off = (tlen >> 2); in flow_track_abort_tcp()
853 th->th_win = 0; in flow_track_abort_tcp()
[all …]
/xnu-11215/tools/lldbmacros/
H A Dworkqueue.py46 def GetWQThreadSummary(th, uth): argument
47 p = th.t_tro.tro_proc
87 …0x} {kind: <9s} {kq: <#020x} {idle: <10s} {uu_workq_flags: <30s}".format(th=th, uth=uth, thport=u…
138 th = kern.GetValueFromAddress(cmd_args[0], "struct thread *")
139 if not (th.thread_tag & 0x20):
143 print(GetWQThreadSummary(th, GetBSDThread(th)))
/xnu-11215/bsd/net/
H A Dpf.c5576 pd->src, th->th_dport, th->th_sport, in pf_test_rule()
5885 pf_change_a(&th->th_seq, &th->th_sum, in pf_test_rule()
6880 th->th_sum = pf_cksum_fixup(th->th_sum, in pf_pptp_handler()
6884 th->th_sum = pf_cksum_fixup(th->th_sum, in pf_pptp_handler()
7082 pd->src, th->th_dport, th->th_sport, in pf_test_state_tcp()
7137 pd->src, th->th_dport, th->th_sport, in pf_test_state_tcp()
7508 th->th_sport, ntohl(th->th_ack), 0, in pf_test_state_tcp()
7609 pbuf_copy_back(pbuf, off, sizeof(*th), th, sizeof(*th)); in pf_test_state_tcp()
9832 if (!pf_pull_hdr(pbuf, off, &th, sizeof(th), sizeof(th), in pf_test()
9857 if (th.th_sport == 0 || th.th_dport == 0) { in pf_test()
[all …]
H A Dpf_norm.c2666 flags = th->th_flags; in pf_normalize_tcp()
2696 if (flags != th->th_flags || th->th_x2 != 0) { in pf_normalize_tcp()
2702 th->th_flags = flags; in pf_normalize_tcp()
2703 th->th_x2 = 0; in pf_normalize_tcp()
2706 th->th_sum = pf_cksum_fixup(th->th_sum, ov, nv, 0); in pf_normalize_tcp()
2712 th->th_sum = pf_cksum_fixup(th->th_sum, th->th_urp, 0, 0); in pf_normalize_tcp()
2713 th->th_urp = 0; in pf_normalize_tcp()
2739 pbuf_copy_back(pbuf, off, sizeof(*th), th, sizeof(*th)); in pf_normalize_tcp()
2932 &th->th_sum, in pf_normalize_tcp_stateful()
2964 int optlen = (th->th_off << 2) - sizeof(*th); in pf_normalize_tcp_stateful()
[all …]
/xnu-11215/bsd/pthread/
H A Dpthread_workqueue.c1075 thread_t th; in workq_add_new_idle_thread() local
1092 &th, in workq_add_new_idle_thread()
1114 *new_thread = th; in workq_add_new_idle_thread()
2468 thread_mtx_lock(th); in bsdthread_set_self()
2522 thread_mtx_unlock(th); in bsdthread_set_self()
2623 if (th == THREAD_NULL) { in bsdthread_add_explicit_override()
2630 thread_deallocate(th); in bsdthread_add_explicit_override()
2640 if (th == THREAD_NULL) { in bsdthread_remove_explicit_override()
2647 thread_deallocate(th); in bsdthread_remove_explicit_override()
3652 thread_freeze_base_pri(th); in workq_thread_return()
[all …]
/xnu-11215/tests/recount/
H A Drecount_tests.c79 thread_start(struct usage_thread *th, const char *name, enum usage_style style) in thread_start() argument
81 th->ut_style = style; in thread_start()
82 th->ut_name = name; in thread_start()
83 th->ut_arg = 1; in thread_start()
85 int error = pthread_create(&th->ut_thread, NULL, in thread_start()
86 style == USAGE_SPIN ? spin_thread : sleep_thread, &th->ut_arg); in thread_start()
94 thread_end(struct usage_thread *th) in thread_end() argument
96 th->ut_arg = 0; in thread_end()
98 int error = pthread_join(th->ut_thread, NULL); in thread_end()
100 T_LOG("terminated %s thread", th->ut_name); in thread_end()

1234