Skip to content

Instantly share code, notes, and snippets.

View jasonwhite's full-sized avatar

Jason White jasonwhite

  • Greater Seattle Area
View GitHub Profile
@DanGe42
DanGe42 / context_demo.c
Created October 25, 2013 03:14
A non-trivial example of how to use user contexts for trivial scheduling.
#include <ucontext.h>
#include <sys/types.h>
#include <sys/time.h>
#include <signal.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <poll.h>
/* ucontext sample program