EAThread - EAThread implements a unified cross-platform interface for multithreaded programming.

Overview

EAThread

EAThread implements a unified cross-platform interface for multithreaded programming on various platforms.

Build Status

Documentation

Please see Introduction.

Compiling sources

Please see CONTRIBUTING.md for details on compiling and testing the source.

Credits

Roberto Parolin is the current EAThread owner within EA and is responsible for the open source repository.

License

Modified BSD License (3-Clause BSD license) see the file LICENSE in the project root.

Issues
  • Use EABase defines over raw platform checks

    Use EABase defines over raw platform checks

    This is a huge one, sorry for that.

    These commits get rid of raw platform/process/library/compilers defines, i.e. _MSC_VER. And it replaces MSVC warning pragmas with EA_DISABLE_VC_WARNING and the likes. I think this is more clear, and easier to read/reason about.

    I can split the first commit up in smaller, easier digestible commits if needed.

    opened by RA-Kooi 4
  • Android arm64 build error

    Android arm64 build error

    When trying to build EAThread using the 64 bit compilers from the NDK, I get the following errors:

    In file included from ../../library/eaoss/src/EAThread/eathread.cpp:89:
    ../../library/eaoss/src/EAThread/android/eathread_fake_atomic_64.cpp:37:26: error: cast from pointer to smaller type 'unsigned int' loses information
            pthread_mutex_t* lock = EAT_SWAP_LOCK(addr);
                                    ^~~~~~~~~~~~~~~~~~~
    ../../library/eaoss/src/EAThread/android/eathread_fake_atomic_64.cpp:31:54: note: expanded from macro 'EAT_SWAP_LOCK'
    #define EAT_SWAP_LOCK(addr) &sFakeAtomic64SwapLocks[((unsigned)(void*)(addr) >> 3U) % EAT_FAKE_ATOMIC_SWAP_LOCK_COUNT]
                                                         ^~~~~~~~~~~~~~~~~~~~~~~
    ../../library/eaoss/src/EAThread/android/eathread_fake_atomic_64.cpp:52:26: error: cast from pointer to smaller type 'unsigned int' loses information
            pthread_mutex_t* lock = EAT_SWAP_LOCK(addr);
                                    ^~~~~~~~~~~~~~~~~~~
    ../../library/eaoss/src/EAThread/android/eathread_fake_atomic_64.cpp:31:54: note: expanded from macro 'EAT_SWAP_LOCK'
    #define EAT_SWAP_LOCK(addr) &sFakeAtomic64SwapLocks[((unsigned)(void*)(addr) >> 3U) % EAT_FAKE_ATOMIC_SWAP_LOCK_COUNT]
                                                         ^~~~~~~~~~~~~~~~~~~~~~~
    ../../library/eaoss/src/EAThread/android/eathread_fake_atomic_64.cpp:73:26: error: cast from pointer to smaller type 'unsigned int' loses information
            pthread_mutex_t* lock = EAT_SWAP_LOCK(addr);
                                    ^~~~~~~~~~~~~~~~~~~
    ../../library/eaoss/src/EAThread/android/eathread_fake_atomic_64.cpp:31:54: note: expanded from macro 'EAT_SWAP_LOCK'
    #define EAT_SWAP_LOCK(addr) &sFakeAtomic64SwapLocks[((unsigned)(void*)(addr) >> 3U) % EAT_FAKE_ATOMIC_SWAP_LOCK_COUNT]
                                                         ^~~~~~~~~~~~~~~~~~~~~~~
    3 errors generated.
    
    

    Changing that macro to use unsigned long for 64 bit builds eliminates the error, but I'm not sure if that will break functionality since it's not clear to me what that macro is doing.

    opened by AlexRamallo 1
  • Fix CMake build on Ubuntu

    Fix CMake build on Ubuntu

    Change EABase from link to include - the libraries won't build otherwise on Ubuntu. I'm guessing that in the past EABase was a binary library to link against, and was changed to header only - but I didn't chase its history.

    opened by OfekShilon 0
  • MinGW-w64 fixes

    MinGW-w64 fixes

    In this PR I made MinGW-w64 compilers work again with EAThread.
    I opted for using pthreads, as those are native to MinGW-w64 and GCC has no support for SEH intrinsics, such as __try and __catch.

    I tested this with GCC, Clang, MSVC, and Clang-CL, but I can't remember if I tested it on Linux.

    If possible I'd like to extend EAThread to be numa-aware somewhere in the future, so that MinGW users can make use of all threads on new high core count CPUs. I'm assuming the MSVC side is already numa aware.

    As usual, let me know if there are any issues with the PR :)

    opened by RA-Kooi 2
  • Files with the same name

    Files with the same name

    eathread_pthread_stack_info.cpp in both Kettle and unix folders causes the MSVC compiler to complain.

    Renaming them to _kettle and _unix removes the warning.

    opened by BobbyAnguelov 2
Owner
Electronic Arts
Electronic Arts
Header-only library for multithreaded programming

CsLibGuarded Introduction The CsLibGuarded library is a standalone header only library for multithreaded programming. This library provides templated

CopperSpice 178 Jul 18, 2022
A easy to use multithreading thread pool library for C. It is a handy stream like job scheduler with an automatic garbage collector. This is a multithreaded job scheduler for non I/O bound computation.

A easy to use multithreading thread pool library for C. It is a handy stream-like job scheduler with an automatic garbage collector for non I/O bound computation.

Hyoung Min Suh 12 Jun 4, 2022
Single header asymmetric stackful cross-platform coroutine library in pure C.

minicoro Minicoro is single-file library for using asymmetric coroutines in C. The API is inspired by Lua coroutines but with C use in mind. The proje

Eduardo Bart 309 Jul 24, 2022
cross platform subprocess library for c++ similar to design of python subprocess

subprocess cross platform subprocess library for c++ similar to design of python subprocess. See subprocess documentation for further documentation. s

null 118 Jul 3, 2022
Arcana.cpp - Arcana.cpp is a collection of helpers and utility code for low overhead, cross platform C++ implementation of task-based asynchrony.

Arcana.cpp Arcana is a collection of general purpose C++ utilities with no code that is specific to a particular project or specialized technology are

Microsoft 62 Jul 14, 2022
Fiber - A header only cross platform wrapper of fiber API.

Fiber Header only cross platform wrapper of fiber API A fiber is a particularly lightweight thread of execution. Which is useful for implementing coro

Tony Wang 41 Jul 31, 2022
Rpmalloc - Public domain cross platform lock free thread caching 16-byte aligned memory allocator implemented in C

rpmalloc - General Purpose Memory Allocator This library provides a public domain cross platform lock free thread caching 16-byte aligned memory alloc

Mattias Jansson 1.6k Jul 27, 2022
Kokkos C++ Performance Portability Programming EcoSystem: The Programming Model - Parallel Execution and Memory Abstraction

Kokkos: Core Libraries Kokkos Core implements a programming model in C++ for writing performance portable applications targeting all major HPC platfor

Kokkos 1.1k Jul 30, 2022
A General-purpose Parallel and Heterogeneous Task Programming System

Taskflow Taskflow helps you quickly write parallel and heterogeneous tasks programs in modern C++ Why Taskflow? Taskflow is faster, more expressive, a

Taskflow 7.1k Aug 5, 2022
C++React: A reactive programming library for C++11.

C++React is reactive programming library for C++14. It enables the declarative definition of data dependencies between state and event flows. Based on

Sebastian 953 Aug 2, 2022
:copyright: Concurrent Programming Library (Coroutine) for C11

libconcurrent tiny asymmetric-coroutine library. Description asymmetric-coroutine bidirectional communication by yield_value/resume_value native conte

sharow 348 Jul 27, 2022
A competitive programming helper tool, which packages included libraries into a single file, suitable for online judges.

cpack Cpack is a competitive programming helper tool, which packages the main source file along with included libraries into a single file, suitable f

PetarMihalj 11 Apr 22, 2022
Material for the UIBK Parallel Programming Lab (2021)

UIBK PS Parallel Systems (703078, 2021) This repository contains material required to complete exercises for the Parallel Programming lab in the 2021

null 12 May 6, 2022
A General-purpose Parallel and Heterogeneous Task Programming System

Taskflow Taskflow helps you quickly write parallel and heterogeneous task programs in modern C++ Why Taskflow? Taskflow is faster, more expressive, an

Taskflow 7.1k Aug 5, 2022
High Performance Linux C++ Network Programming Framework based on IO Multiplexing and Thread Pool

Kingpin is a C++ network programming framework based on TCP/IP + epoll + pthread, aims to implement a library for the high concurrent servers and clie

null 16 Jul 16, 2022
Cpp-taskflow - Modern C++ Parallel Task Programming Library

Cpp-Taskflow A fast C++ header-only library to help you quickly write parallel programs with complex task dependencies Why Cpp-Taskflow? Cpp-Taskflow

null 4 Mar 30, 2021
ParallelComputingPlayground - Shows different programming techniques for parallel computing on CPU and GPU

ParallelComputingPlayground Shows different programming techniques for parallel computing on CPU and GPU. Purpose The idea here is to compute a Mandel

Morten Nobel-Jørgensen 2 May 16, 2020
Awesome-lockfree - A collection of resources on wait-free and lock-free programming

Awesome Lock-Free A collection of resources on wait-free and lock-free programming. ?? ?? ?? Even better resource from MattPD: C++ links: atomics, loc

Erik Rigtorp 1.3k Jul 26, 2022
Yoga is a cross-platform layout engine which implements Flexbox

Yoga Building Yoga builds with buck. Make sure you install buck before contributing to Yoga. Yoga's main implementation is in C++, with bindings to su

Meta 15.4k Aug 8, 2022
XMRig is a high performance, open source, cross platform RandomX, KawPow, CryptoNight and AstroBWT unified CPU/GPU miner

XMRig is a high performance, open source, cross platform RandomX, KawPow, CryptoNight and AstroBWT unified CPU/GPU miner and RandomX benchmark. Official binaries are available for Windows, Linux, macOS and FreeBSD.

null 7.1k Aug 4, 2022
Header-only library for multithreaded programming

CsLibGuarded Introduction The CsLibGuarded library is a standalone header only library for multithreaded programming. This library provides templated

CopperSpice 178 Jul 18, 2022
Header-only library for multithreaded programming

CsLibGuarded Introduction The CsLibGuarded library is a standalone header only library for multithreaded programming. This library provides templated

CopperSpice 178 Jul 18, 2022
Ole Christian Eidheim 737 Aug 6, 2022
A very simple, fast, multithreaded, platform independent HTTP and HTTPS server and client library implemented using C++11 and Boost.Asio.

A very simple, fast, multithreaded, platform independent HTTP and HTTPS server and client library implemented using C++11 and Boost.Asio. Created to be an easy way to make REST resources available from C++ applications.

Ole Christian Eidheim 2.3k Aug 2, 2022
NVRHI (NVIDIA Rendering Hardware Interface) is a library that implements a common abstraction layer over multiple graphics APIs

NVRHI Introduction NVRHI (NVIDIA Rendering Hardware Interface) is a library that implements a common abstraction layer over multiple graphics APIs (GA

NVIDIA GameWorks 389 Jul 31, 2022
Unified interface for selecting hardware or software SPI implementations on Arduino platforms

AceSPI Unified interface for selecting hardware or software SPI implementations on Arduino platforms. The code was initially part of the AceSegment li

Brian Park 1 Oct 22, 2021
Unified interface for selecting different implementations for communicating with a TM1637 LED controller chip on Arduino platforms

AceTMI Unified interface for communicating with a TM1637 LED controller chip on Arduino platforms. The code was initially part of the AceSegment libra

Brian Park 0 Feb 2, 2022
Unified interface for selecting different I2C implementations on Arduino platforms

AceWire Wrapper classes that provide a simple, unified interface for different I2C implementations on Arduino platforms. The code was initially part o

Brian Park 4 Feb 3, 2022
Video game library manager with support for wide range of 3rd party libraries and game emulation support, providing one unified interface for your games.

An open source video game library manager and launcher with support for 3rd party libraries like Steam, GOG, Origin, Battle.net and Uplay. Includes game emulation support, providing one unified interface for your games.

Josef Nemec 4.3k Aug 7, 2022