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

2010-01-07 Thread Michael Schnell
Jonas Maebe wrote: while the rtl does pre-allocate some memory from the system on startup, it can still allocate more later if necessary, and it can also free memory back to the system. That is why I suggested that he needs to create a Xenomai aware Memory Manager Plugin. Moreover he'd need

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

2010-01-07 Thread Pierre Muller
Envoyé : Wednesday, January 06, 2010 3:38 PM À : FPC developers' list Objet : Re: [fpc-devel] custom ThreadManager and MemoryMutexManager for hard realtime On 06 Jan 2010, at 15:25, Stefan Kisdaroczi wrote: AFAIK the RTL allocs the heap on app startup, or on thread-creation with 2.4.0

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

2010-01-07 Thread Stefan Kisdaroczi
Am 07.01.2010 09:40, schrieb Michael Schnell: Jonas Maebe wrote: while the rtl does pre-allocate some memory from the system on startup, it can still allocate more later if necessary, and it can also free memory back to the system. That is why I suggested that he needs to create a

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

2010-01-07 Thread Michael Schnell
Sounds nice. It would be a beautiful o the RTL to allow for Xenomai aware memory management and to provide some Xenomai-aware standard functions (timer, thread locking, ...) -Michael ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

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

2010-01-06 Thread Michael Schnell
Stefan Kisdaroczi wrote: to create hard realtime linux programs with freepascal and xenomai [1] in userspace Ooops Userspace means Linux and Linux means no hard realtime possible (with the official definition of hard realtime: reaching a predefined timing deadline with 100% certainty).

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

2010-01-06 Thread Florian Klaempfl
Michael Schnell schrieb: Stefan Kisdaroczi wrote: to create hard realtime linux programs with freepascal and xenomai [1] in userspace Ooops Userspace means Linux and Linux means no hard realtime possible (with the official definition of hard realtime: reaching a predefined timing

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

2010-01-06 Thread Jonas Maebe
On 05 Jan 2010, at 16:39, Stefan Kisdaroczi wrote: Looking at rtl/inc/heap.inc from 2.4.0 it seems that the locking is now done using CriticalSections, is that true ? Yes. To adapt my ThreadManager for 2.4.0 I think I have to: - remove the SetMemoryMutexManager() call - implement the

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

2010-01-06 Thread Michael Schnell
Florian Klaempfl wrote: Did you look at the xenomai website? Seemingly you need to do your own device drivers and not use any Linux system calls in your realtime process, that seems to run Linux in a kind of virtualization. So FPC programming for realtime would require to prevent FPC from

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

2010-01-06 Thread Florian Klaempfl
Michael Schnell schrieb: Florian Klaempfl wrote: Did you look at the xenomai website? Seemingly you need to do your own device drivers and not use any Linux system calls in your realtime process, that seems to run Linux in a kind of virtualization. Hard real time causes a lot of

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

2010-01-06 Thread Stefan Kisdaroczi
Am 06.01.2010 12:35, schrieb Michael Schnell: Florian Klaempfl wrote: Did you look at the xenomai website? Seemingly you need to do your own device drivers and not use any Linux system calls in your realtime process, that seems to run Linux in a kind of virtualization. So FPC

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

2010-01-06 Thread Michael Schnell
Stefan Kisdaroczi wrote: You can call normal linux system calls without problems, that is one of the big features of xenomai, but of course you have to take care, it can have an impact on the realtime performance. Meaning that when doing a Linux system call, at this point a potentially huge

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

2010-01-06 Thread Stefan Kisdaroczi
Am 06.01.2010 14:02, schrieb Michael Schnell: Stefan Kisdaroczi wrote: You can call normal linux system calls without problems, that is one of the big features of xenomai, but of course you have to take care, it can have an impact on the realtime performance. Meaning that when doing a

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

2010-01-06 Thread Jonas Maebe
On 06 Jan 2010, at 15:25, Stefan Kisdaroczi wrote: AFAIK the RTL allocs the heap on app startup, or on thread-creation with 2.4.0. In my code im using getmem() to alloc mem from the heap, this will not generate syscalls because the heap is already allocated and the RTL has its own

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

2010-01-06 Thread Stefan Kisdaroczi
Am 06.01.2010 15:38, schrieb Jonas Maebe: On 06 Jan 2010, at 15:25, Stefan Kisdaroczi wrote: AFAIK the RTL allocs the heap on app startup, or on thread-creation with 2.4.0. In my code im using getmem() to alloc mem from the heap, this will not generate syscalls because the heap is