libcommunism
Userspace cooperative threading library
libcommunism Documentation

This is the autogenerated documentation for the libcommunism library.

Introduction

libcommunism is intended to be a really, really fast, portable, and small implementation of cooperative multithreading in userspace.

License

The library is available under the terms of the ISC License.

Copyright (c) 2021 Tristan Seifert

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Installation

The library is typically built as a static library, as there are C++ ABI instability problems with C++ shared libraries on many platforms. However, if you really want to build it as a shared library, set the BUILD_SHARED flag when compiling.

In all cases, the library is built using CMake. Built it as with any other project; i.e. to get started, from the root directory of the source, execute mkdir build && cmake .. for most UNIX-like platforms.

Porting

Supporting other architectures and platforms should be relatively trivial. See the cothread implementation class for an example of the required interaces. In addition, the active platform in use must provide a method to initialize the initial cothread for a given kernel thread.

More Information

For more information, check out the project site.