digitalmars.D.learn - real time
- Frank Benoit (6/6) Dec 07 2005 Hello ng
- Dave (5/11) Dec 08 2005 Perhaps these will help:
- Thomas Kuehne (10/12) Dec 09 2005 -----BEGIN PGP SIGNED MESSAGE-----
- Frank Benoit (40/40) Dec 09 2005 Thanks for the replies.
- Dave (8/48) Dec 10 2005 I would say the basic rules would be:
Hello ng * Is it possible to write kernel modules in D? * Is it possible to write realtime apps in D? For example using the rtai for linux. * If any, what are the missing requirements? Frank
Dec 07 2005
In article <dn67ub$1u3c$1 digitaldaemon.com>, Frank Benoit says...Hello ng * Is it possible to write kernel modules in D? * Is it possible to write realtime apps in D? For example using the rtai for linux. * If any, what are the missing requirements? FrankPerhaps these will help: http://digitalmars.com/d/iasm.html http://digitalmars.com/d/memory.html http://digitalmars.com/d/interfaceToC.html
Dec 08 2005
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Frank Benoit schrieb am 2005-12-07:Hello ng * Is it possible to write kernel modules in D?http://dkernel.kuehne.cn/hello.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFDmgiX3w+/yD4P9tIRAl4oAKCMOXC9gmbLXGCPPz72/Uo2lBpILACfZoQU dB9zT9GgCoC3fhiyQi1xIjQ= =7P5z -----END PGP SIGNATURE-----
Dec 09 2005
Thanks for the replies. it seems to me, D can be an alternative to C/C++ in realtime programming. From http://www.digitalmars.com/d/memory.html#realtime "The most reliable way to guarantee latency is to preallocate all data that will be needed by the time critical portion." What are the things to avoid? - every new - dynamic arrays in general? - slicing arrays - concatenating strings? - ...? Can I make a dynamic allocation protection. A mechanism that throws an exception if the programm makes a direkt or indirekt allocation. The disable/enable of the gc, does only throw outofmemory. Is there a possibility to get the exception at the first unwanted allocation try? void InterruptServiceRoutine() { std.gc.disable(); try { /// all the realtime things } catch( OutOfMemory oom ) { } finally { std.gc.enable(); } } Does the gc and D work with RTAI Lxrt? http://www.rtai.org/documentation/magma/html/api/whatis_lxrt.html There is this: "They must be POSIX real time Linux processes locked into memory using SCHED_FIFO. Thus their memory must be pre grown to its maximum extension and completely locked in memory." I do not understand that completely, especially not the consequences for D and the gc. Frank
Dec 09 2005
In article <dndh3a$289t$1 digitaldaemon.com>, Frank Benoit says...Thanks for the replies. it seems to me, D can be an alternative to C/C++ in realtime programming. From http://www.digitalmars.com/d/memory.html#realtime "The most reliable way to guarantee latency is to preallocate all data that will be needed by the time critical portion." What are the things to avoid? - every new - dynamic arrays in general? - slicing arrays - concatenating strings? - ...?I would say the basic rules would be: - avoid the built-in new (you can override it - that's covered in the docs.). - use static arrays instead of the built-in dynamic arrays. The compiler disallows concatenation and - don't use .dup on any type of array. Slices return a reference to the array and, for D style arrays, also modify the length member. But they should not allocate memory.Can I make a dynamic allocation protection. A mechanism that throws an exception if the programm makes a direkt or indirekt allocation. The disable/enable of the gc, does only throw outofmemory. Is there a possibility to get the exception at the first unwanted allocation try? void InterruptServiceRoutine() { std.gc.disable(); try { /// all the realtime things } catch( OutOfMemory oom ) { } finally { std.gc.enable(); } } Does the gc and D work with RTAI Lxrt? http://www.rtai.org/documentation/magma/html/api/whatis_lxrt.html There is this: "They must be POSIX real time Linux processes locked into memory using SCHED_FIFO. Thus their memory must be pre grown to its maximum extension and completely locked in memory." I do not understand that completely, especially not the consequences for D and the gc. Frank
Dec 10 2005