[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MiNT] Library system
Hi All!
It's been a long time... ;-)
I just wanted to say that most, if not all, of the features of the shared
library system that you have been discussing here on the list are covered by
the Fenix library system. I will make a "TOS/MiNTified" system available in
a few days. I hope you will find it useful. Here are some features:
* Low overhead binding. A short example in assembly for calling a library
routine:
move.l rout_offset(a0),a2
jsr (a2)
It's just as straightforward in C as the address table is just a vector of
function pointers. As default parameters are passed in registers. However
parameters may be passed on the stack even though that isn't always as
elegant as passing parameters in registers. The prefered scheme of passing
stackbased parameters is to pass a pointer to the stack based parameters in
a register.
* Support for 3 types of calls: User level calls as described above.
Supervisor level calls which are called through the kernel for safety
reasons and finally there are Kernel level calls that are used to implement
kernel additions. I would recon that user level calls are sufficient in MiNT
for the time being. The supervisor and kernel level calls need additional
kernel calls.
* The scheme is compatible with MagiC's library scheme.
* It is possible to let the MiNT kernel deallocate libraries when processes
using them are killed or exited.
The library system has been designed by a group of developers and we have
been working on it for quite some time to ensure it will work in all
possible situations. I have been briefly monitoring the latest discussions
regring libraries here on the list and think that it will fit quite nicely.
Regards
Sven