Skip to content
Snippets Groups Projects
Select Git revision
  • 152568bcb61e65b700ca2b963534f2632d080345
  • main default protected
  • phhw
  • captouch-threshold
  • t
  • dos
  • test2
  • test
  • slewtest
  • simtest
  • view-think
  • vm-pending
  • media-buf
  • scope
  • passthrough
  • wave
  • vsync
  • dos-main-patch-50543
  • json-error
  • rahix/big-flow3r
  • pippin/media_framework
  • v1.3.0
  • v1.2.0
  • v1.2.0+rc1
  • v1.1.1
  • v1.1.0
  • v1.1.0+rc1
  • v1.0.0
  • v1.0.0+rc6
  • v1.0.0+rc5
  • v1.0.0+rc4
  • v1.0.0+rc3
  • v1.0.0+rc2
  • v1.0.0+rc1
34 results

nlr.h

Blame
  • Forked from flow3r / flow3r firmware
    Source project has a limited visibility.
    nlr.h 608 B
    // non-local return
    // exception handling, basically a stack of setjmp/longjmp buffers
    
    #include <limits.h>
    
    //#ifndef __WORDSIZE
    //#error __WORDSIZE needs to be defined
    //#endif
    
    typedef struct _nlr_buf_t nlr_buf_t;
    struct _nlr_buf_t {
        // the entries here must all be machine word size
        nlr_buf_t *prev;
        void *ret_val;
    #if __WORDSIZE == 32
        void *regs[6];
    #elif __WORDSIZE == 64
        void *regs[8];
    #else
        // hack for thumb
        void *regs[10];
    //#error Unsupported __WORDSIZE
    #endif
    };
    
    unsigned int nlr_push(nlr_buf_t *);
    void nlr_pop();
    void nlr_jump(void *val) __attribute__((noreturn));