MCPcopy Create free account
hub / github.com/Tencent/libco / RoutineFunc

Function RoutineFunc

example_copystack.cpp:29–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27#include "co_routine_inner.h"
28
29void* RoutineFunc(void* args)
30{
31 co_enable_hook_sys();
32 int* routineid = (int*)args;
33 while (true)
34 {
35 char sBuff[128];
36 sprintf(sBuff, "from routineid %d stack addr %p\n", *routineid, sBuff);
37
38 printf("%s", sBuff);
39 poll(NULL, 0, 1000); //sleep 1s
40 }
41 return NULL;
42}
43
44int main()
45{

Callers

nothing calls this directly

Calls 2

co_enable_hook_sysFunction · 0.85
pollFunction · 0.85

Tested by

no test coverage detected