Git Product home page Git Product logo

tinythreads's Introduction

TinyThreads

TinyThreads is POSIX threads (pthreads) compatible tiny multi-threading library for 32-bit microcontrollers.

Currently, following processors are supported:

  • Intel(Altera) Nios II
  • Xilinx Zynq-7000 (Cortex-A9)
  • Microchip PIC32 (MIPS32 Architecture)

マニュアル / Manuals

See TinyThreads wiki.

ライセンス / License

The MIT License

対応している機能 / Supported features

ほとんどの機能は <pthread.h> ヘッダファイルで提供されます。
Most features are provided in <pthread.h> header file.

スレッド操作とスケジューリング / Thread operation and scheduling

Interface Name Conforming to Remarks
Type pthread_t POSIX.1-2001
Function pthread_create() POSIX.1-2001
Function pthread_exit() POSIX.1-2001
Function pthread_join() POSIX.1-2001
Function pthread_detach() POSIX.1-2001
Function pthread_self() POSIX.1-2001
Function pthread_equal() POSIX.1-2001
Type pthread_attr_t POSIX.1-2001
Function pthread_attr_init() POSIX.1-2001
Function pthread_attr_destroy() POSIX.1-2001
Function pthread_attr_setdetachstate() POSIX.1-2001
Function pthread_attr_getdetachstate() POSIX.1-2001
Function pthread_attr_setschedparam() POSIX.1-2001
Function pthread_attr_getschedparam() POSIX.1-2001
Function pthread_attr_setschedpolicy() POSIX.1-2001
Function pthread_attr_getschedpolicy() POSIX.1-2001
Function pthread_attr_setstack() POSIX.1-2001
Function pthread_attr_getstack() POSIX.1-2001
Function pthread_attr_setstacksize() POSIX.1-2001
Function pthread_attr_getstacksize() POSIX.1-2001
Function sched_get_priority_max() POSIX.1-2001 <sched.h>
Function sched_get_priority_min() POSIX.1-2001 <sched.h>
Function shced_yield() POSIX.1-2001 <sched.h>

ミューテックス / Mutex

Interface Name Conforming to Remarks
Type pthread_mutex_t POSIX.1-2001
Macro PTHREAD_MUTEX_INITIALIZER POSIX.1-2001
Function pthread_mutex_destroy() POSIX.1-2001
Function pthread_mutex_init() POSIX.1-2001
Function pthread_mutex_lock() POSIX.1-2001
Function pthread_mutex_trylock() POSIX.1-2001
Function pthread_mutex_unlock() POSIX.1-2001

セマフォ / Semaphore

Interface Name Conforming to Remarks
Type sem_t POSIX.1-2001 <semaphore.h>
Function sem_destroy() POSIX.1-2001 <semaphore.h>
Function sem_init() POSIX.1-2001 <semaphore.h>
Function sem_post() POSIX.1-2001 <semaphore.h> Can be used in ISR
Function sem_wait() POSIX.1-2001 <semaphore.h>
Function sem_trywait() POSIX.1-2001 <semaphore.h>

条件付き変数 / Conditional variables

Interface Name Conforming to Remarks
Type pthread_cond_t POSIX.1-2001
Macro PTHREAD_COND_INITIALIZER POSIX.1-2001
Function pthread_cond_destroy() POSIX.1-2001
Function pthread_cond_init() POSIX.1-2001
Function pthread_cond_broadcast() POSIX.1-2001
Function pthread_cond_signal() POSIX.1-2001
Function pthread_cond_wait() POSIX.1-2001

1回きりの初期化 / Once control

Interface Name Conforming to Remarks
Type pthread_once_t POSIX.1-2001
Macro PTHREAD_ONCE_INIT POSIX.1-2001
Function pthread_once() POSIX.1-2001

pthreads以外の機能 / Features outside of pthreads

以下のAPIは、本来pthreadsのカバーする範囲ではありませんが、マルチスレッド環境に対して効率的な実装をTinyThreadsが提供できるものです。 The following APIs are outside of pthreads but TinyThreads can provide a more effective implementation for multi-threading environment.

Interface Name Conforming to Remarks
Function sleep() POSIX.1-2001 <unistd.h>
Function usleep() POSIX.1-2001 <unistd.h>

削除されている機能 / Dropped features

以下に挙げる機能はTinyThreadsが目指す「小さなマルチスレッド環境」に不要と判断され、 削除された機能です。原則として、将来も対応する予定はありません。
The features below are dropped because they are not useful in "tiny" multi-threading environment. As a general rule, they have never been supported in the future.

  • pthread_atfork()
  • pthread_cancel()
  • pthread_key*()
  • pthread_getspecific()
  • pthread_setspecific()
  • sem_open()
  • sem_unlink()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.