Skip to content

Instantly share code, notes, and snippets.

@keesj
Created March 27, 2014 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keesj/9805344 to your computer and use it in GitHub Desktop.
Save keesj/9805344 to your computer and use it in GitHub Desktop.
#include <ucontext.h>
ucontext_t ctx;
int
main(void)
{
getcontext(&ctx);
if (ctx.uc_mcontext.mc_magic != 0xc0ffee)
printf("Wot\n");
ctx.uc_flags |= _UC_IGNSIGM | _UC_IGNFPU;
getcontext(&ctx);
if (ctx.uc_mcontext.mc_magic != 0xc0ffee)
printf("Wot2\n");
ddekit_init();
ddekit_thread_create(long_running_thread, NULL, "long_thread");
ddekit_thread_create(short_running_thread, NULL, "short_thread");
ddekit_minix_wait_exit();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment