| 42 | } |
| 43 | |
| 44 | int main() |
| 45 | { |
| 46 | stShareStack_t* share_stack= co_alloc_sharestack(1, 1024 * 128); |
| 47 | stCoRoutineAttr_t attr; |
| 48 | attr.stack_size = 0; |
| 49 | attr.share_stack = share_stack; |
| 50 | |
| 51 | stCoRoutine_t* co[2]; |
| 52 | int routineid[2]; |
| 53 | for (int i = 0; i < 2; i++) |
| 54 | { |
| 55 | routineid[i] = i; |
| 56 | co_create(&co[i], &attr, RoutineFunc, routineid + i); |
| 57 | co_resume(co[i]); |
| 58 | } |
| 59 | co_eventloop(co_get_epoll_ct(), NULL, NULL); |
| 60 | return 0; |
| 61 | } |
nothing calls this directly
no test coverage detected