This was tested on:
- Ubuntu 14.04 x64
- Ubuntu 16.04 x64
#include <pthread.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#define BUF_SIZE 5 | |
// the buffer works like a stack for | |
// the sake of simplicity, if needed | |
// we may implement a queue |