Lines Matching refs:forkArg
34 struct ForkArgs *forkArg = static_cast<struct ForkArgs *>(arg); in ThreadFunc() local
35 forkArg->childFunc(&forkArg->args); in ThreadFunc()
36 printf("Exit thread %d %d \n", forkArg->args.type, gettid()); in ThreadFunc()
37 free(forkArg); in ThreadFunc()
45 struct ForkArgs *forkArg = static_cast<struct ForkArgs *>(malloc(sizeof(struct ForkArgs))); in SubInitFork() local
46 if (forkArg == nullptr) { in SubInitFork()
49 forkArg->childFunc = childFunc; in SubInitFork()
50 forkArg->args.socket[0] = args->socket[0]; in SubInitFork()
51 forkArg->args.socket[1] = args->socket[1]; in SubInitFork()
52 forkArg->args.type = args->type; in SubInitFork()
53 int ret = pthread_create(&g_thread, nullptr, ThreadFunc, forkArg); in SubInitFork()
56 free(forkArg); in SubInitFork()