All Projects → mulle-concurrent → mulle-thread

mulle-concurrent / mulle-thread

Licence: other
🔠 Cross-platform thread/mutex/tss/atomic operations in C

Programming Languages

c
50402 projects - #5 most used programming language
objective c
16641 projects - #2 most used programming language
CMake
9771 projects
shell
77523 projects

Projects that are alternatives of or similar to mulle-thread

Concurrency
Java 并发编程知识梳理以及常见处理模式 features and patterns
Stars: ✭ 495 (+2150%)
Mutual labels:  atomic, thread
Portable Snippets
Collection of miscellaneous portable C snippets.
Stars: ✭ 397 (+1704.55%)
Mutual labels:  atomic, portable
AtomicKit
Concurrency made simple in Swift.
Stars: ✭ 88 (+300%)
Mutual labels:  atomic, thread
Swiftcoroutine
Swift coroutines for iOS, macOS and Linux.
Stars: ✭ 690 (+3036.36%)
Mutual labels:  atomic, thread
metadata-tools
Contains tools for metadata, such as Roslyn's metadata visualizer.
Stars: ✭ 37 (+68.18%)
Mutual labels:  portable
BingMapsSDSToolkit
This toolkit makes it easy to use the Bing Maps Spatial Data Services (SDS) in .NET
Stars: ✭ 39 (+77.27%)
Mutual labels:  portable
Portable-WebDAV-Library
Moved to codeberg.org - https://codeberg.org/DecaTec/Portable-WebDAV-Library - The Portable WebDAV Library is a strongly typed, async WebDAV client library which is fully compliant to RFC 4918, RFC 4331 and "Additional WebDAV Collection Properties". It is implemented as .NETStandard 1.1 library in oder to be used on any platform supporting .NETS…
Stars: ✭ 45 (+104.55%)
Mutual labels:  portable
cpp-thread-study
C++ 线程库示例及教程
Stars: ✭ 38 (+72.73%)
Mutual labels:  thread
wine-portable-executable
Wine builds packed into portable executables
Stars: ✭ 85 (+286.36%)
Mutual labels:  portable
dotfiles
Portable configuration files and utility scripts for Linux and OpenBSD
Stars: ✭ 29 (+31.82%)
Mutual labels:  portable
Adun
A way to backdoor every process
Stars: ✭ 58 (+163.64%)
Mutual labels:  thread
RxSchedulerSuppress
RxSchedulerSuppress 是用于抑制 RxJava 在同一个线程池内重复调度的工具
Stars: ✭ 30 (+36.36%)
Mutual labels:  thread
thread-priority
A simple thread schedule and priority library for rust
Stars: ✭ 48 (+118.18%)
Mutual labels:  thread
oconfigure
configuration script for BSD.lv projects
Stars: ✭ 36 (+63.64%)
Mutual labels:  portable
mcfgthread
Cornerstone of the MOST efficient std::thread on Windows for mingw-w64
Stars: ✭ 143 (+550%)
Mutual labels:  thread
betterdocs
📚 Web version of https://github.com/khusnetdinov/ruby.fundamental repo - Fundamental programming with ruby examples and references. It covers threads, SOLID principles, design patterns, data structures, algorithms. Books for reading.
Stars: ✭ 25 (+13.64%)
Mutual labels:  thread
ungoogled-chromium-portable
🚀 Ungoogled Chromium portable for Windows
Stars: ✭ 96 (+336.36%)
Mutual labels:  portable
dropt
dropt is yet another C library for parsing command-line options.
Stars: ✭ 39 (+77.27%)
Mutual labels:  portable
whatsapp-portable
🚀 WhatsApp portable for Windows
Stars: ✭ 36 (+63.64%)
Mutual labels:  portable
FiniteStateMachine
This project is a finite state machine designed to be used in games.
Stars: ✭ 45 (+104.55%)
Mutual labels:  portable

mulle-thread

🔠 Cross-platform thread/mutex/tss/atomic operations in C

mulle-thread is a set of C wrapper headers for a simplified subset of thread functions and for a limited range of atomic operations that strongly mimics the thread standard, even if thread is not available. On Windows it has to do a bit more work.

mulle-threads main advantages are simplicity, portability, sanity.

  • basic atomic operations CAS, ++, -- on void pointers.
  • basic thread operations
  • mutex functionality
  • thread local storage, with proper destruction

Since thread has <stdatomic.h> and <threads.h>, eventually this project could become superflous. In the meantime though it's a convenient abstraction on threads and atomic operations.

Warning

mulle_thread_once doesn't guarantee, that exceptions or thread cancellation within the init function will clear the once flag for a second run. In fact it will not.

Release Version
Build Status Mulle kybernetiK tag

API

You are here

Overview

Add

Use mulle-sde to add mulle-thread to your project:

mulle-sde dependency add --c --github mulle-concurrent mulle-thread

Install

mulle-sde

Use mulle-sde to build and install mulle-thread and all dependencies:

mulle-sde install --prefix /usr/local \
   //github.com/mulle-concurrent/mulle-thread/archive/latest.tar.gz

Manual Installation

Install the requirements:

Requirements Description
mulle-c11 Compiler glue header
mintomic Don't build this! Unpack it into the mulle-thread folder and rename the directory to mintomic

Install into /usr/local:

mkdir build 2> /dev/null
(
   cd build ;
   cmake -DCMAKE_INSTALL_PREFIX=/usr/local \
         -DCMAKE_PREFIX_PATH=/usr/local \
         -DCMAKE_BUILD_TYPE=Release .. ;
   make install
)

Platforms

  • OS X
  • iOS
  • Linux
  • FreeBSD
  • Windows

Compilers

  • clang
  • gcc
  • MSVC

thread support in clang as of v3.8 is lacking, as there is no <threads.h>. The fallback is pthreads.

Architectures

If <stdatomic.h> is not available for your architecture, then mulle-thread is limited to:

  • x86
  • x86_64
  • arm

That is because of mintomic limitations. mintomic is the original source for the provided atomic operations. Unfortunately it's not really active anymore, so for example ARM64 doesn't work. mulle-thread will use mintomic only, if <stdatomic.h> is not available.

Author

Nat! for Mulle kybernetiK and Codeon GmbH

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].