replace pthread with c++ thread

This commit is contained in:
springzfx
2020-05-30 00:14:18 +08:00
parent cc83c1ae55
commit ec9609cec8
5 changed files with 45 additions and 62 deletions

View File

@@ -90,11 +90,10 @@ int execsnoop() {
return 0;
}
void *startThread(void *arg) {
thread_arg *p = (thread_arg *)arg;
callback = p->handle_pid;
void startThread(function<int(int)> c, promise<void> status) {
status.set_value();
callback = c;
execsnoop();
return (void *)0;
}
} // namespace CGPROXY::EXECSNOOP