Skip to content

Instantly share code, notes, and snippets.

@sposterkil
Created March 21, 2015 19:15
Show Gist options
  • Save sposterkil/339a7162d3537837723a to your computer and use it in GitHub Desktop.
Save sposterkil/339a7162d3537837723a to your computer and use it in GitHub Desktop.
SHM Access
int shm_id = shmget(SHM_KEY, 1024, 0777);
my_shared = (struct common *)shmat(shm_id, 0, 0);
if ((my_shared->bridge_dir == GOING_EAST ||
my_shared->bridge_dir == NONE) &&
(my_shared->xed_count < 4 &&
(my_shared->xed_count + my_shared->xing_count) < 5)) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment