Skip to content

Instantly share code, notes, and snippets.

@mkusher
Created June 29, 2014 16:27
Show Gist options
  • Save mkusher/6167c199f0c116724df7 to your computer and use it in GitHub Desktop.
Save mkusher/6167c199f0c116724df7 to your computer and use it in GitHub Desktop.
void * receiver(void * fake){
Message message;
while(1){
message = queue.get(messages_type);
printf(Messages::TEMPLATE, message.author, message.body);
}
}
void * sender(void * fake) {
while(1){
printf("Enter message: ");
scanf("%s", message.body);
queue.post(message);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment