| 230 | } |
| 231 | |
| 232 | static void *thread_alloc_space(struct thread *t, size_t bytes) |
| 233 | { |
| 234 | /* Allocate the amount of space on the stack keeping the stack |
| 235 | * aligned to the architecture requirement. */ |
| 236 | t->stack_current -= ALIGN_UP(bytes, ARCH_STACK_ALIGN_SIZE); |
| 237 | |
| 238 | return (void *)t->stack_current; |
| 239 | } |
| 240 | |
| 241 | static void threads_initialize(void) |
| 242 | { |