]>
git.saurik.com Git - cycript.git/blob - Trampoline.t.cpp
1 #define _PTHREAD_ATTR_T
2 #include <pthread_internals.h>
8 extern "C" void Start(Baton
*baton
) {
10 baton
->_pthread_set_self(&self
);
13 baton
->pthread_create(&thread
, NULL
, &Routine
, baton
);
16 baton
->pthread_detach(thread
);
18 baton
->thread_terminate(baton
->mach_thread_self());
21 void *Routine(void *arg
) {
22 Baton
*baton(reinterpret_cast<Baton
*>(arg
));
23 baton
->dlopen(baton
->library
, RTLD_LAZY
| RTLD_GLOBAL
);