modula-2: Fix stack size request in initPreemptive [PR108405]
authorIain Sandoe <iain@sandoe.co.uk>
Sat, 14 Jan 2023 10:20:47 +0000 (10:20 +0000)
committerIain Sandoe <iain@sandoe.co.uk>
Mon, 23 Jan 2023 17:25:49 +0000 (17:25 +0000)
commitbcc023e2b4dd0dc1fd1fca3ea12664d5bdade4dc
tree3df4fabb051d4ac0c2cc7d3fb62472f7e8ef1683
parentb457cab64038cd9b7a8481594ff673f1822681f6
modula-2: Fix stack size request in initPreemptive [PR108405]

As noted in the PR, the problem is that we make a request for additional
stack that violates the constraints on some systems.

This patch chooses a value that is divisible by common OS page sizes.

TODO: the user value should be checked and then an exception thrown if it
is not suitable.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
PR modula2/108405

gcc/m2/ChangeLog:

* gm2-libs-iso/Preemptive.mod (initPreemptive): Use a value for
extra space that is divisible by common OS pagesizes.
gcc/m2/gm2-libs-iso/Preemptive.mod