Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/arch.h

    rf35749e r26a9388  
    4949 *
    5050 */
     51#if __has_builtin(__builtin_stack_address)
     52
     53#define CURRENT \
     54        ((current_t *) (((uintptr_t) __builtin_stack_address()) & \
     55            (~((uintptr_t) STACK_SIZE - 1))))
     56
     57#else
     58
    5159#define CURRENT \
    5260        ((current_t *) (((uintptr_t) __builtin_frame_address(0)) & \
    5361            (~((uintptr_t) STACK_SIZE - 1))))
     62
     63#endif
    5464
    5565#define MAGIC  UINT32_C(0xfacefeed)
Note: See TracChangeset for help on using the changeset viewer.