プロジェクト
概要
コンパイル時にメモリを確保し、評価できるシンプルなC++11リングバッファ実装です。
その他のプロジェクト計測したスター増加
- 24時間
- 0
- 7日間
- 0
- 15日間
- -1
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルRing Buffer
- pure C++11, no OS dependency
- lock and wait free bounded SPSC operation
- no exceptions, RTTI, virtual functions and dynamic memory allocation
- designed for compile time (static) allocation and type evaluation
- no wasted slots (in powers of 2 granularity)
- underrun and overrun checks in insert/remove functions
- highly efficient on most microcontroller architectures (nearly equal performance as in 'wasted-slot' implemetation)
notes
- index_t of size less than architecture reg size (size_t) might not be most efficient (known gcc bug)
- Only lamda expressions or functor callbacks can be inlined into
buffWrite/buffReadfunctions - 8 bit architectures are not supported in master branch at the moment. Broken code is likely to be generated
- relaxed atomic stores on RISC-V gcc port may be inefficient
- the DEC Alpha ultra-weak memory model is not supported
example
jnk0le::Ringbuffer<const char*, 256> message;
int main()
{
//...
while(1)
{
const char* tmp = nullptr;
while(!message.remove(tmp));
printf("%s fired\n", tmp);
//...
}
}
extern "C" void SysTick_Handler(void)
{
message.insert("SysTick_Handler");
}
関連プロジェクトを探す
読み込み中…