Friday, May 15, 2020

Digest for comp.lang.c++@googlegroups.com - 1 update in 1 topic

Bonita Montero <Bonita.Montero@gmail.com>: May 15 07:22PM +0200

If you really need a decent semaphore-class, here's one I've written as
I wrote my lock-free LRU-algorithm:
 
#pragma once
#if defined(_MSC_VER)
#include <Windows.h>
#include <intrin.h>
#elif defined(__unix__)
#include <semaphore.h>
#include <pthread.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>
#include <sys/stat.h>
#include <climits>

No comments: