When using rts_setInCallCapability, lock incall threads

This diff makes sure that incall threads, when using `rts_setInCallCapability`, will be created as locked.
If the thread is not locked, the thread might end up being scheduled to a different capability.
While this is mentioned in the docs for `rts_setInCallCapability,`, it makes the method significantly less useful as there is no guarantees on the capability being used.

This commit also adds a test to make sure things stay on the correct capability.
22 jobs for !4267 with incall_8_10 in 39 minutes and 20 seconds (queued for 1 second)
detached
Status Job ID Name Coverage
  Tool Lint
failed #469355
lint
ghc-linters

00:01:07

passed #469356
lint
lint-linters

00:01:09

passed #469359
lint
lint-submods

00:00:25

passed #469357
lint
lint-testsuite

00:00:17

passed #469358
lint
typecheck-testsuite

00:00:15

 
  Quick Build
passed #469360
x86_64-linux
hadrian-ghc-in-ghci

00:12:38

 
  Lint
failed #469361
lint
lint-base

00:10:44

 
  Build
failed #469362
x86_64-linux
validate-x86_64-linux-deb9-hadrian

00:24:49

 
  Full Build
skipped #469365
aarch64-linux allowed to fail
validate-aarch64-linux-deb10
skipped #469366
armv7-linux allowed to fail
validate-armv7-linux-deb10
skipped #469367
x86_64-linux
validate-i386-linux-deb9
skipped #469364
x86_64-darwin
validate-x86_64-darwin
skipped #469368
x86_64-linux
validate-x86_64-linux-deb9-debug
skipped #469370
x86_64-linux
validate-x86_64-linux-deb9-dwarf
skipped #469369
x86_64-linux
validate-x86_64-linux-deb9-integer-simple
skipped #469363
x86_64-linux
validate-x86_64-linux-deb9-unreg-hadrian
skipped #469371
x86_64-linux
validate-x86_64-linux-fedora27
skipped #469372
new-x86_64-windows test allowed to fail
validate-x86_64-windows-hadrian
 
  Packaging
skipped #469373
x86_64-linux allowed to fail
doc-tarball
 
  Testing
manual #469374
x86_64-linux allowed to fail manual
hackage
skipped #469376
x86_64-linux-perf
perf
skipped #469375
x86_64-linux
perf-nofib
 
Name Stage Failure
failed
validate-x86_64-linux-deb9-hadrian Build
$ .gitlab/ci.sh clean
Using locale C.UTF-8...
Running make --quiet clean...
Running rm -Rf _build...
Uploading artifacts for failed job
Uploading artifacts...
WARNING: junit.xml: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1
failed
ghc-linters Tool Lint
commit 024fb7190cfd1f0f797f2cf391ae81c517ac6bea has whitespace linter issues:

*ERROR* rts/RtsAPI.c:464: introduces trailing whitespace
> " * rts_inCall() is similar to rts_evalIO, but expects to be called as an incall, "

Validation FAILED for 024fb7190cfd1f0f797f2cf391ae81c517ac6bea
=====================================================================================
Validation FAILED because at least one commit had linter errors!
ERROR: Job failed: exit code 1
failed
lint-base Lint
476 |         ASSERT(cap->no == ((*cap)->running_task->preferred_capability % enabled_capabilities));
| ^
rts/RtsAPI.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-nonportable-include-path’
`cc' failed in phase `C Compiler'. (Exit code: 1)



ERROR: Job failed: exit code 1