Skip to content

Instantly share code, notes, and snippets.

@sposterkil
Created March 21, 2015 19:15
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 sposterkil/4932a0be5827e1548074 to your computer and use it in GitHub Desktop.
Save sposterkil/4932a0be5827e1548074 to your computer and use it in GitHub Desktop.
SHM Setup
shm_id = shmget(SHM_KEY, 1024, 0777|IPC_CREAT);
shared = (struct common *)shmat(shm_id, 0, 0);
shared->xing_count = 0;
shared->xed_count = 0;
shared->eastbound_wait = 0;
shared->westbound_wait = 0;
shared->bridge_dir = NONE;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment