pavel-kirienko / o1heap

Constant-complexity deterministic memory allocator (heap) for hard real-time high-integrity embedded systems. There is very little activity because the project is finished and does not require further changes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove critical section hooks to enhance MISRA conformance

pavel-kirienko opened this issue · comments

Remove critical section enter/leave hooks:

o1heap/o1heap/o1heap.h

Lines 98 to 99 in bd93277

const O1HeapHook critical_section_enter,
const O1HeapHook critical_section_leave);

Equivalent behaviors can be implemented by wrapping library calls in custom user code instead.

The README should be changed accordingly, currently it says

In the case of concurrent environments, also pass pointers to the synchronization locking/unlocking functions -- they will be invoked by the library to facilitate atomic transactions. Alternatively, some applications (where possible) might benefit from using a separate heap per thread to avoid the synchronization overhead and reduce contention.

@jrahlf thanks! Fixed in #10