- ctx_addr = (uintptr_t)context;
- makecontext(&((smx_ctx_sysv_t) context)->uc, (void (*)())smx_ctx_sysv_wrapper,
- SIZEOF_VOIDP / SIZEOF_INT + 1, SIZEOF_VOIDP / SIZEOF_INT,
-#if (SIZEOF_VOIDP == SIZEOF_INT)
- (int)ctx_addr
-#elif (SIZEOF_VOIDP == 2 * SIZEOF_INT)
- (int)(ctx_addr >> (8 * sizeof(int))),
- (int)(ctx_addr)
-#else
-#error Your architecture is not supported yet
-#endif
- );
+ ctx_addr.addr = context;
+ makecontext(&context->uc, (void (*)())smx_ctx_sysv_wrapper,
+ CTX_ADDR_LEN, CTX_ADDR_SPLIT(ctx_addr));