Projects / Cheap Threads

Cheap Threads

Cheap Threads is a collection of portable C routines for implementing sychronous threads. It includes a scheduler and a facility for passing messages among threads. Threads may run in a round robin or according to a priority scheme. Each thread must voluntarily relinquish control from time so that other threads can run. Since the threads are synchronous, i.e. they don't interrupt each other, they don't need to use semaphores, mutexes, critical sections, or other facilities to keep from interfering with each other. One version of Cheap Threads is designed for embedded systems.

Tags Software Development Libraries
Licenses LGPL
Operating Systems OS Independent
Implementation C

Tweet this project Short link

Rss Recent releases

  • Rrelease-mid
  •  16 May 2005 23:33
  • Rrelease-after

Changes: This release adds an optional ct_return() function by which a thread may return control to the scheduler by a setjmp/longjmp mechanism rather than by an ordinary function return. In some circumstances, ct_return() may be more efficient or more convenient. By default, ct_return() is disabled in order to avoid overhead for applications that don't use it, but you can enable it by using a compile-time macro.

  • Rrelease-mid
  •  08 Sep 2003 04:03
  • Rrelease-after

Changes: The Cheap Threads functions can now be called directly from C++ programs. A new sample program, demo1, was included to demonstrate two threads that take turns writing to standard output.

  • Rrelease-mid
  •  28 Jul 2003 05:28
  • Rrelease-after

Changes: A memory leak, which was introduced in v2.5, is now fixed. The leak occurred when activating a thread with an enqueue instead of a message.

  • Rrelease-mid
  •  10 Jun 2003 18:34
  • Rrelease-after

Changes: The message-passing machinery now uses a reference-counting scheme to reduce the overhead of delivering messages. This change also reduces the use of memory, especially when distributing long messages to multiple threads. The API is unchanged.

  • Rrelease-mid
  •  19 May 2003 18:42
  • Rrelease-after

Changes: Cheap Threads now offers a timeout facility as a compiletime option. A thread may put itself to sleep and be awakened after a specified interval, if some other event doesn't awaken it first. There is now a mailing list for discussion and support of Cheap Threads.

No-screenshot

Project Spotlight

PyDaF

A data-driven processing library.

No-screenshot

Project Spotlight

libkate

A codec for timed text and images, suitable for overlaying on a video.