[fpc-devel] custom ThreadManager and MemoryMutexManager for hard realtime

Stefan Kisdaroczi kisda at hispeed.ch
Tue Jan 5 16:39:56 CET 2010


to create hard realtime linux programs with freepascal and xenomai [1] in userspace
I'm installing a custom ThreadManager and a MemoryMutexManager on program init like this:
  SetThreadManager( XenoThreadManager );
  SetMemoryMutexManager( XenoMemoryMutexManager );

This worked until 2.2.4. With fpc 2.4.0, TMemoryMutexManager was removed with commit
"r7407 20.5.2007 + heap manager now per thread, reduce heap lock contention"

Looking at rtl/inc/heap.inc from 2.4.0 it seems that the locking is now done using "CriticalSections",
is that true ?

To adapt my ThreadManager for 2.4.0 I think I have to:
- remove the SetMemoryMutexManager() call
- implement the *CriticalSection() calls in my XenoThreadManager

Has someone any hints, comments or concerns about the approach ?
Anyone else interested in building hard realtime programs using fpc and xenomai ?

thank you

[1] Xenomai Real-Time Framework for Linux - www.xenomai.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20100105/f96253f3/attachment.sig>

More information about the fpc-devel mailing list