Lines Matching refs:res
67 struct thread *th, *res = NULL; in __threads_table_entry__get_last_match() local
72 res = thread__get(th); in __threads_table_entry__get_last_match()
74 return res; in __threads_table_entry__get_last_match()
95 struct thread *res; in threads__find() local
98 res = __threads_table_entry__get_last_match(table, tid); in threads__find()
99 if (!res) { in threads__find()
100 if (hashmap__find(&table->shard, tid, &res)) in threads__find()
101 res = thread__get(res); in threads__find()
104 if (res) in threads__find()
105 threads_table_entry__set_last_match(table, res); in threads__find()
106 return res; in threads__find()
112 struct thread *res = NULL; in threads__findnew() local
116 res = thread__new(pid, tid); in threads__findnew()
117 if (res) { in threads__findnew()
118 if (hashmap__add(&table->shard, tid, res)) { in threads__findnew()
120 thread__put(res); in threads__findnew()
121 res = NULL; in threads__findnew()
122 if (hashmap__find(&table->shard, tid, &res)) in threads__findnew()
123 res = thread__get(res); in threads__findnew()
125 res = thread__get(res); in threads__findnew()
128 if (res) in threads__findnew()
129 __threads_table_entry__set_last_match(table, res); in threads__findnew()
132 return res; in threads__findnew()