MCPcopy Create free account
hub / github.com/ReadyTalk/avian / makeThread

Method makeThread

src/classpath-android.cpp:178–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176 }
177
178 virtual GcThread* makeThread(Thread* t, Thread* parent)
179 {
180 const unsigned NormalPriority = 5;
181
182 GcThreadGroup* group = 0;
183 PROTECT(t, group);
184 if (parent) {
185 group = parent->javaThread->group();
186 } else {
187 resolveSystemClass(t,
188 roots(t)->bootLoader(),
189 type(t, GcThreadGroup::Type)->name(),
190 false);
191
192 group = cast<GcThreadGroup>(t, makeNew(t, type(t, GcThreadGroup::Type)));
193
194 GcMethod* constructor
195 = resolveMethod(t, type(t, GcThreadGroup::Type), "<init>", "()V");
196
197 t->m->processor->invoke(t, constructor, group);
198 }
199
200 resolveSystemClass(
201 t, roots(t)->bootLoader(), type(t, GcThread::Type)->name(), false);
202
203 GcThread* thread = cast<GcThread>(t, makeNew(t, type(t, GcThread::Type)));
204 PROTECT(t, thread);
205
206 GcMethod* constructor
207 = resolveMethod(t,
208 type(t, GcThread::Type),
209 "<init>",
210 "(Ljava/lang/ThreadGroup;Ljava/lang/String;IZ)V");
211
212 t->m->processor->invoke(
213 t, constructor, thread, group, 0, NormalPriority, false);
214
215 thread->setContextClassLoader(t, roots(t)->appLoader());
216
217 return thread;
218 }
219
220 virtual object makeJMethod(Thread* t, GcMethod* vmMethod)
221 {

Callers

nothing calls this directly

Calls 9

rootsFunction · 0.85
typeFunction · 0.85
makeNewFunction · 0.85
setContextClassLoaderMethod · 0.80
resolveSystemClassFunction · 0.70
resolveMethodFunction · 0.70
invokeMethod · 0.65
groupMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected