Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Arnd Gazecki cfanatic

🎯
Focusing
View GitHub Profile
@cfanatic
cfanatic / hello.cpp
Last active Jul 4, 2021
Simple program in C++
View hello.cpp
#include <iostream>
int main() {
std::cout << "Hello World!" << std::endl;
return 0;
}
@cfanatic
cfanatic / fifo.cpp
Last active Jul 4, 2021
Non-blocking FIFO process
View fifo.cpp
#include <boost/iostreams/device/file_descriptor.hpp>
#include <boost/iostreams/stream.hpp>
#include <boost/asio.hpp>
#include <iostream>
void read_pipe()
{
int fifo_d;
boost::asio::io_service io_service;
std::vector<uint8_t> buffer(10);
@cfanatic
cfanatic / CMakeLists.txt
Created Jul 4, 2021
Non-blocking FIFO process
View CMakeLists.txt
cmake_minimum_required(VERSION 3.18)
project(fifo)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
find_package(Boost 1.74.0 COMPONENTS iostreams system)
include_directories(${Boost_INCLUDE_DIR})
add_executable(fifo fifo.cpp)
target_link_libraries(fifo ${Boost_LIBRARIES})