Home
last modified time | relevance | path

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

12

/tools/lib/thermal/
A Dsampling.c17 struct thermal_handler *th = thp->th; in handle_thermal_sample() local
26 return th->ops->sampling.tz_temp( in handle_thermal_sample()
36 struct thermal_handler_param thp = { .th = th, .arg = arg }; in thermal_sampling_handle()
38 if (!th) in thermal_sampling_handle()
45 return nl_recvmsgs(th->sk_sampling, th->cb_sampling); in thermal_sampling_handle()
50 if (!th) in thermal_sampling_fd()
53 return nl_socket_get_fd(th->sk_sampling); in thermal_sampling_fd()
58 if (nl_unsubscribe_thermal(th->sk_sampling, th->cb_sampling, in thermal_sampling_exit()
62 nl_thermal_disconnect(th->sk_sampling, th->cb_sampling); in thermal_sampling_exit()
69 if (nl_thermal_connect(&th->sk_sampling, &th->cb_sampling)) in thermal_sampling_init()
[all …]
A Dthermal.c13 if (!th) in for_each_thermal_threshold()
17 ret |= cb(&th[i], arg); in for_each_thermal_threshold()
121 thermal_cmd_exit(th); in thermal_exit()
122 thermal_events_exit(th); in thermal_exit()
125 free(th); in thermal_exit()
132 th = malloc(sizeof(*th)); in thermal_init()
133 if (!th) in thermal_init()
135 th->ops = ops; in thermal_init()
143 if (thermal_cmd_init(th)) in thermal_init()
146 return th; in thermal_init()
[all …]
A Devents.c150 struct thermal_handler_param thp = { .th = th, .arg = arg }; in thermal_events_handle()
152 if (!th) in thermal_events_handle()
159 return nl_recvmsgs(th->sk_event, th->cb_event); in thermal_events_handle()
162 int thermal_events_fd(struct thermal_handler *th) in thermal_events_fd() argument
164 if (!th) in thermal_events_fd()
167 return nl_socket_get_fd(th->sk_event); in thermal_events_fd()
172 if (nl_unsubscribe_thermal(th->sk_event, th->cb_event, in thermal_events_exit()
176 nl_thermal_disconnect(th->sk_event, th->cb_event); in thermal_events_exit()
183 thermal_events_ops_init(&th->ops->events); in thermal_events_init()
185 if (nl_thermal_connect(&th->sk_event, &th->cb_event)) in thermal_events_init()
[all …]
A Dcommands.c394 if (nl_send_msg(th->sk_cmd, th->cb_cmd, msg, genl_handle_msg, arg)) in thermal_genl_auto()
420 return thermal_genl_auto(th, thermal_genl_tz_id_encode, &p, in thermal_cmd_get_trip()
428 return thermal_genl_auto(th, thermal_genl_tz_id_encode, &p, in thermal_cmd_get_governor()
436 return thermal_genl_auto(th, thermal_genl_tz_id_encode, &p, in thermal_cmd_get_temp()
445 return thermal_genl_auto(th, thermal_genl_tz_id_encode, &p, in thermal_cmd_threshold_get()
480 thermal_error_t thermal_cmd_exit(struct thermal_handler *th) in thermal_cmd_exit() argument
485 nl_thermal_disconnect(th->sk_cmd, th->cb_cmd); in thermal_cmd_exit()
490 thermal_error_t thermal_cmd_init(struct thermal_handler *th) in thermal_cmd_init() argument
495 if (nl_thermal_connect(&th->sk_cmd, &th->cb_cmd)) in thermal_cmd_init()
502 ret = genl_ops_resolve(th->sk_cmd, &thermal_cmd_ops); in thermal_cmd_init()
[all …]
/tools/lib/thermal/include/
A Dthermal.h116 LIBTHERMAL_API void thermal_exit(struct thermal_handler *th);
121 LIBTHERMAL_API thermal_error_t thermal_events_exit(struct thermal_handler *th);
123 LIBTHERMAL_API thermal_error_t thermal_events_init(struct thermal_handler *th);
127 LIBTHERMAL_API int thermal_events_fd(struct thermal_handler *th);
132 LIBTHERMAL_API thermal_error_t thermal_cmd_exit(struct thermal_handler *th);
134 LIBTHERMAL_API thermal_error_t thermal_cmd_init(struct thermal_handler *th);
136 LIBTHERMAL_API thermal_error_t thermal_cmd_get_tz(struct thermal_handler *th,
139 LIBTHERMAL_API thermal_error_t thermal_cmd_get_cdev(struct thermal_handler *th,
142 LIBTHERMAL_API thermal_error_t thermal_cmd_get_trip(struct thermal_handler *th,
148 LIBTHERMAL_API thermal_error_t thermal_cmd_get_temp(struct thermal_handler *th,
[all …]
/tools/testing/selftests/bpf/progs/
A Dtest_btf_skc_cls_ingress.c27 if (th->syn) { in test_syncookie_helper()
33 if (th->doff * 4 != 40) { in test_syncookie_helper()
38 if ((void *)th + 40 > data_end) { in test_syncookie_helper()
44 th, 40); in test_syncookie_helper()
55 th, sizeof(*th)); in test_syncookie_helper()
74 struct tcphdr *th; in handle_ip_tcp() local
86 th = (struct tcphdr *)(ip4h + 1); in handle_ip_tcp()
87 if (th + 1 > data_end) in handle_ip_tcp()
90 if (th->dest != srv_sa4.sin_port) in handle_ip_tcp()
103 th = (struct tcphdr *)(ip6h + 1); in handle_ip_tcp()
[all …]
A Dtest_misc_tcp_hdr_options.c36 struct tcphdr th; in __check_active_hdr_in() member
119 if (hdr.th.dest != passive_lport_n || hdr.th.source != active_lport_n) in __check_active_hdr_in()
132 struct tcphdr *th; in check_active_hdr_in() local
137 th = skops->skb_data; in check_active_hdr_in()
138 if (th + 1 > skops->skb_data_end) in check_active_hdr_in()
144 if (th->fin) in check_active_hdr_in()
147 if (th->ack && !th->fin && tcp_hdrlen(th) == skops->skb_len) in check_active_hdr_in()
175 struct tcphdr *th; in write_active_opt() local
217 th = skops->skb_data; in write_active_opt()
221 if (th->syn) { in write_active_opt()
[all …]
A Dtest_assign_reuse.c81 maybe_assign_tcp(struct __sk_buff *skb, struct tcphdr *th) in maybe_assign_tcp() argument
83 if (th + 1 > (void *)(long)(skb->data_end)) in maybe_assign_tcp()
86 if (!th->syn || th->ack || th->dest != bpf_htons(dest_port)) in maybe_assign_tcp()
89 __builtin_memcpy(&headers.tcp, th, sizeof(headers.tcp)); in maybe_assign_tcp()
A Dtest_select_reuseport_kern.c105 struct tcphdr *th = data; in _select_by_skb_data() local
107 if (th + 1 > data_end) in _select_by_skb_data()
110 data_check.skb_ports[0] = th->source; in _select_by_skb_data()
111 data_check.skb_ports[1] = th->dest; in _select_by_skb_data()
113 if (th->fin) in _select_by_skb_data()
119 if ((th->doff << 2) + sizeof(*cmd) > data_check.len) in _select_by_skb_data()
121 if (bpf_skb_load_bytes(reuse_md, th->doff << 2, &cmd_copy, in _select_by_skb_data()
A Dverifier_netfilter_ctx.c96 const struct tcphdr *th; in with_valid_ctx_access_test6() local
114 th = bpf_dynptr_slice(&ptr, ihl, buffer_th, sizeof(buffer_th)); in with_valid_ctx_access_test6()
115 if (!th) in with_valid_ctx_access_test6()
118 return th->dest == bpf_htons(22) ? NF_ACCEPT : NF_DROP; in with_valid_ctx_access_test6()
A Dtest_tcp_hdr_options.c377 struct tcphdr *th; in handle_write_hdr_opt() local
388 th = skops->skb_data; in handle_write_hdr_opt()
389 if (th + 1 > skops->skb_data_end) in handle_write_hdr_opt()
468 struct tcphdr *th; in handle_passive_estab() local
489 th = skops->skb_data; in handle_passive_estab()
490 if (th + 1 > skops->skb_data_end) in handle_passive_estab()
493 if (th->syn) { in handle_passive_estab()
534 struct tcphdr *th; in handle_parse_hdr() local
539 th = skops->skb_data; in handle_parse_hdr()
540 if (th + 1 > skops->skb_data_end) in handle_parse_hdr()
[all …]
A Dtest_tc_dtime.c146 struct tcphdr *th; in skb_get_type() local
185 th = trans; in skb_get_type()
186 if (th + 1 > data_end) in skb_get_type()
188 sport = th->source; in skb_get_type()
189 dport = th->dest; in skb_get_type()
A Dtest_xdp.c50 struct tcphdr *th; in get_dport() local
55 th = (struct tcphdr *)trans_data; in get_dport()
56 if (th + 1 > data_end) in get_dport()
58 return th->dest; in get_dport()
A Dtest_xdp_loop.c46 struct tcphdr *th; in get_dport() local
51 th = (struct tcphdr *)trans_data; in get_dport()
52 if (th + 1 > data_end) in get_dport()
54 return th->dest; in get_dport()
/tools/testing/selftests/drivers/net/mlxsw/
A Dsharedbuffer_configuration.py36 def _get_static_size(self, th): argument
49 th = random.randint(3, 16)
51 return th
82 th = self._get_th(pool)
84 return (pool_n, th)
89 th = self._get_th(pool)
90 return (th,)
237 def dl_set(self, pool, th): argument
271 tcbind.dl_set(pool, th)
311 def dl_set(self, th): argument
[all …]
/tools/thermal/thermal-engine/
A Dthermal-engine.c38 struct thermal_handler *th; member
44 th->temperature, th->direction); in show_threshold()
92 struct thermal_handler *th = arg; in set_threshold() local
98 if (thermal_cmd_threshold_flush(th, tz)) { in set_threshold()
104 if (thermal_cmd_threshold_add(th, tz, thresholds[i], in set_threshold()
296 return thermal_events_handle(td->th, td); in thermal_event()
386 td.th = thermal_init(&ops); in main()
387 if (!td.th) { in main()
392 td.tz = thermal_zone_discover(td.th); in main()
398 for_each_thermal_zone(td.tz, set_threshold, td.th); in main()
[all …]
/tools/perf/util/
A Dthreads.c67 struct thread *th, *res = NULL; in __threads_table_entry__get_last_match() local
69 th = table->last_match; in __threads_table_entry__get_last_match()
70 if (th != NULL) { in __threads_table_entry__get_last_match()
71 if (thread__tid(th) == tid) in __threads_table_entry__get_last_match()
72 res = thread__get(th); in __threads_table_entry__get_last_match()
78 struct thread *th) in __threads_table_entry__set_last_match() argument
81 table->last_match = thread__get(th); in __threads_table_entry__set_last_match()
85 struct thread *th) in threads_table_entry__set_last_match() argument
88 __threads_table_entry__set_last_match(table, th); in threads_table_entry__set_last_match()
/tools/perf/tests/workloads/
A Dthloop.c35 pthread_t th; in thloop() local
44 pthread_create(&th, NULL, thfunc, test_loop); in thloop()
46 pthread_join(th, NULL); in thloop()
/tools/testing/selftests/net/lib/
A Dcsum.c258 struct tcphdr *th = _th; in build_packet_tcp() local
260 th->source = htons(cfg_port_src); in build_packet_tcp()
261 th->dest = htons(cfg_port_dst); in build_packet_tcp()
262 th->doff = 5; in build_packet_tcp()
263 th->check = 0; in build_packet_tcp()
265 th->check = checksum(th, IPPROTO_TCP, sizeof(*th) + cfg_payload_len); in build_packet_tcp()
268 th->check = ~th->check; in build_packet_tcp()
271 return th + 1; in build_packet_tcp()
618 struct tcphdr *tcph = th; in recv_verify_packet_tcp()
628 struct udp_encap_hdr *eh = th; in recv_verify_packet_udp_encap()
[all …]
/tools/perf/tests/shell/coresight/thread_loop/
A Dthread_loop.c21 pthread_t th; member
80 args[i].th = new_thr(thrfn, &(args[i])); in main()
83 pthread_join(args[i].th, &(args[i].ret)); in main()
/tools/perf/tests/shell/coresight/memcpy_thread/
A Dmemcpy_thread.c12 pthread_t th; member
73 args[i].th = new_thr(thrfn, &(args[i])); in main()
76 pthread_join(args[i].th, &(args[i].ret)); in main()
/tools/perf/tests/shell/coresight/unroll_loop_thread/
A Dunroll_loop_thread.c10 pthread_t th; member
68 args[i].th = new_thr(thrfn, &(args[i])); in main()
71 pthread_join(args[i].th, &(args[i].ret)); in main()
/tools/testing/selftests/timens/
A Dvfork_exec.c50 pthread_t th; in check_in_thread() local
53 if (pthread_create(&th, NULL, tcheck, &args)) in check_in_thread()
55 if (pthread_join(th, &retval)) in check_in_thread()
/tools/testing/selftests/net/forwarding/
A Ddevlink_lib.sh159 local th=$1; shift
161 devlink sb port pool set $port pool $pool th $th
174 devlink sb port pool set $port pool $pool th $orig
243 local th=$1; shift
245 devlink sb tc bind set $port tc $tc type $dir pool $pool th $th
260 pool ${orig[0]} th ${orig[1]}
/tools/testing/selftests/bpf/
A Dtest_tcp_hdr_options.h96 static inline unsigned int tcp_hdrlen(const struct tcphdr *th) in tcp_hdrlen() argument
98 return th->doff << 2; in tcp_hdrlen()

Completed in 38 milliseconds

12