| 294 | } |
| 295 | |
| 296 | static stStackMem_t* co_get_stackmem(stShareStack_t* share_stack) |
| 297 | { |
| 298 | if (!share_stack) |
| 299 | { |
| 300 | return NULL; |
| 301 | } |
| 302 | int idx = share_stack->alloc_idx % share_stack->count; |
| 303 | share_stack->alloc_idx++; |
| 304 | |
| 305 | return share_stack->stack_array[idx]; |
| 306 | } |
| 307 | |
| 308 | |
| 309 | // ---------------------------------------------------------------------------- |