Ignore:
Timestamp:
2024-10-13T08:23:40Z (8 weeks ago)
Author:
GitHub <noreply@…>
Children:
0472cf17
Parents:
2a0c827c (diff), b3b79981 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
boba-buba <120932204+boba-buba@…> (2024-10-13 08:23:40)
git-committer:
GitHub <noreply@…> (2024-10-13 08:23:40)
Message:

Merge branch 'HelenOS:master' into topic/packet-capture

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/arch/sparc64/include/libarch/thread.h

    r2a0c827c rebb1489  
    3535#define _LIBC_sparc64_THREAD_H_
    3636
     37#include <assert.h>
     38#include <align.h>
     39#include <libarch/stack.h>
     40
     41static inline uintptr_t arch_thread_prepare(void *stack, size_t stack_size,
     42    void (*main)(void *), void *arg)
     43{
     44        /* We must leave space above the stack pointer for initial register spill area. */
     45        uintptr_t *sp = (uintptr_t *) ALIGN_DOWN((uintptr_t) stack + stack_size - STACK_WINDOW_SAVE_AREA_SIZE - STACK_ARG_SAVE_AREA_SIZE, 16);
     46
     47        sp[-1] = (uintptr_t) arg;
     48        sp[-2] = (uintptr_t) main;
     49
     50        return ((uintptr_t) sp) - STACK_BIAS;
     51}
     52
    3753#endif
    3854
Note: See TracChangeset for help on using the changeset viewer.