SparkFun Forums 

Where electronics enthusiasts find answers.

Everything ARM and LPC
By X-Hawk
#133325
The library is designed to support ARM Cortex M0, with very small memory usage.
It can be downloaded from google code
http://code.google.com/p/tinythread/

TinyThread Specifications

Multitask
  • Round-Robin
    Preemptive
    Can avoid priority inversion by mutex
Task Specifications
  • Define Tasks, Unlimited
    Active Tasks, Unlimited
    User Priorities, Unlimited
    Thread Stack Checking, Supported
Context Switch Time,
  • <300 cycles without thread sleeping and stack checking supported.
    <400 cycles with thread sleeping and stack checking supported.
Time
  • delay, supported by tt_sleep()
    micro delay, supported by tt_usleep()
Inter-Task Communication
  • Semaphores, Unlimited
    Mutexes, Unlimited
    Recursive mutexes, Unlimited
    Conditions, Unlimited
    Mailbox(Message), Unlimited
Thread/Irq Communication
  • Semaphores/Mutexes/Recursive Mutexed/Conditions can be used in Irq. (Some functions are limited, see Doc\TinyThread.doc)
Memory specifications
  • RAM Space for a Task
    • Task Stack Size + 68 Bytes(MAX)
      Task Stack Size + 28 Bytes(MIN)
    RAM Space for a Semaphore, 8 Bytes
    RAM Space for a Mutex, 8 Bytes
    RAM Space for a Recursive Mutex, 16 Bytes
    RAM Space for a Condition, 12 Bytes
    RAM Space for a Mailbox, 40 Bytes + user defined message buffer