These changes adds an additional record field to record structure TMsgPort in
order to support SMP for ABIv11 (non m68k targets only).
This additional field contains two opaque IPTR's/PtrUInt's and therefor breaks
compatibility between ABIv0, ABIv1 and ABIv11 as well as make them binary
incompatible.
It also renders ABIv11 incompatible with itself when this change was introduced
on march 18 2022. Recompilation of existing code for this ABI is thus required.
See: b9bc67accc
These changes makes sure that the use of record structure spinlock is not
active/available when compiling for AROS ABIv11 as that ABI does not support
spinlocks as implemented for AROS ABIv1.
Note that this is a ABI and Binary Compatible break between ABIv1 and ABIv11.
These changes makes sure that the use of record structure TSpinlock can only
be enabled/active for AROS ABIv1 as that ABI is currently the only ABI that
is able to support SMP by using the spinlock record structure.
This commit will add an additional spinlock field to record structures
TMsgPort and TSemaphoreRequest for a SMP enabled build.
This will break ABI and Binary Compatibility between ABIv0 and ABIv1 and for
ABIv1 (for a SMP enabled build).
Recompilation in such case is required as both record structures TMsgPort and
TSemaphoreRequest are embedded in other record structures which causes a
myriad of changes to those records including different record sizes and other
field offsets.
Note that SMP is currently only available for ABIv1 and afaik only supported
for AROS target x86_64 while AROS target i386 has initial support for SMP
(but not actively enabled).
SMP enabled build can be 'activated' by defining AROS_PLATFORM_SMP and
AROSEXEC_SMP.
In 2015 ABIv1 introduced support for spinlocks for SMP enabled builds (1) by
use of a special spinlock structure.
This structure was later updated to end up in its current form in 2017 (2)
This commit adds this record structure to both RTL (execd) and unit (exec).
The structure can be "enabled" by defining AROSPLATFORM_SMP during build.
1) b6045c27fd
2) 0ffdbdc48f
These changes break API/Binary Compatibility between ABIv0 and ABIv1.
Field stdOut is replaced by undefined field named _pad for ABIv1 while
(still) being present as stdOut for ABIv0.
Field DebugConfig is completely removed from ABIv1 (still present for ABIv0).
If your code depends on either of these two fields then you need to make
appropriate changes when compiling for ABIv1.
Removing dependency on either of these two mentioned fields is preferred.
Both RTL (execd.inc) and unit (exec.pas) are updated.
See also 194cc5e1c5
These changes break Binary Compatibility between ABIv0 and ABIv1.
Record TETask was not compliant to ABIv1 because field et_Compatibility is
only required for ABIv0 (06538a1790).
Therefor these changes update record TETask for both RTL (execd.inc) and unit
exec (exec.pas) so that field et_Compatibility is only present for ABIv0.
The impact of these changes should be minimal because all relevant fields are
still accessible (some located at another offset) and code should never rely
on the size of this structure.
Bring RTL (execd.inc) structure TETask up to date to unit exec (exec.pas).
This structure situated in the RTL was (literally) based on the MorphOS
version which is not compliant to AROS.
The original MorphOS TETask structure can still be 'activated' when the flag
AROS_MORPHOS_COMPATIBLE is defined when compiling the RTL and exec unit (as
is also the case in the original AROS repo).
Memory sizes are expressed in IPTR/PtrUInt in order to be compatible to both
32 and 64-bit.
Affects both record structures and API call signatures.
See: d7df812342
Solve crashes when opening, closing and managing files for AROS 64-bit when
filehandles are located in memory > 32-bit by making sure the used file
handles are actually of type BPTR/THandle instead of longint/cardinal
(and stays compatible to AROS 32-bit).
sorting algorithms. A default QuickSort implementation is provided by the
unit. Other units can be added, to provide other sorting algorithms (e.g.
HeapSort, MergeSort, IntroSort, etc.)
* TList and TFPList updated to use the current default sorting algorithm defined
in SortBase for their .Sort method.
git-svn-id: trunk@41167 -
Each port that allows the usage of dynamic libraries should call InitSystemDynLibs during initialization of the System unit.
The DynLibs unit has been adjusted to be a forwarder for the functions that now reside in the System unit (for backwards compatiblity just in case). Additionally the unit will register the DynLibsManager if it doesn't reside in the System unit anyway.
Currently only the Windows targets (Win32, Win64 and WinCE) implement the DynLibsManager inside the System unit. For other systems using the LoadLibrary, etc. functions will lead to a run error/exception.
If a port wants to implement its own DynLibsManager then it needs to define DISABLE_NO_DYNLIBS_MANAGER. TLibHandle, NilHandle and optionally TOrdinalEntry (it's set to SizeUInt otherwise) should be defined in sysdlh.inc which needs to be enabled using the define FPC_SYSTEM_HAS_SYSDLH (because there are targets which have FEATURE_DYNLIBS enabled, but don't support them... e.g. powerpc-wii -.-).
The DynLibsManager contains methods for loading a library based on a RawByteString and based on a UnicodeString. BOTH should be implemented, but internally one can forward to the other.
The loading by ordinal *can* be be implemented. If it is set to Nil then the implementation of GetProcAddress(lib,ordinal) will return Nil.
+ new functions SetDynLibsManager and GetDynLibsManager to set and retrieve the current DynLibsManager
* provide interface of DynLibs unit in unit System
git-svn-id: trunk@29613 -
- fixed to always update the stacksize in __stklen, so the RTL knows the correct stacksize (StackLength in system unit is correct)
- this probably also fixes stack checking or opens the way to have a working stack checking on AROS, but that was not tested
+ call PASCALMAIN via exec/NewStackSwap() and provide a larger stack when the pre-set value is higher than what the system provides
+ use operatingsystem_result to simplify return code handling
These changes bring the AROS startup's stack handling to the Amiga/m68k and MorphOS level
git-svn-id: trunk@28611 -
- fixed all Amiga-like system units to not leak the last directory
lock while changing back to the original dir in System_exit;
(a bug found by Marcus Sackrow, thanks!)
* renamed AOS_origDir to ASYS_origDir
git-svn-id: trunk@28537 -