Skip to content

Instantly share code, notes, and snippets.

Artur Brugeman brugeman

Block or report user

Report or block brugeman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@brugeman
brugeman / wrp.hpp
Last active Aug 29, 2015
C++11 port of WriterReaderPhaser
View wrp.hpp
// C++11 port of WriterReaderPhaser, see
// http://stuff-gil-says.blogspot.ru/2014/11/writerreaderphaser-story-about-new.html
// Ported by Artur Brugeman and released to the public domain,
// as explained at http://creativecommons.org/publicdomain/zero/1.0/
#include <atomic>
#include <limits>
#include <chrono>
#include <stdexcept>
#include <mutex>
@brugeman
brugeman / smrp.hpp
Created May 26, 2015
Pointer storage with safe memory reclamation
View smrp.hpp
// based on http://www.research.ibm.com/people/m/michael/podc-2002.pdf
// also resembles RCU.
#ifndef SMRP_HPP
#define SMRP_HPP
#include <cassert>
#include <cstdio>
#include <atomic>
@brugeman
brugeman / smrp_test.cpp
Created May 22, 2015
SMR pointer storage checked with relacy race detector.
View smrp_test.cpp
#include <cstdio>
#include "relacy/relacy_std.hpp"
namespace smrp_test
{
// Single Writer Multiple Readers pointer storage,
// both writers and readers are lock-free,
// writers wait for all readers to finish
You can’t perform that action at this time.