Do not cas on slowpath of SpinLock unnecessarily

This is a well known technique to reduce inter-CPU bus traffic while waiting for the lock by reducing the number of writes.
25 jobs for !4835 with spinlock in 443 minutes and 15 seconds (queued for 1 second)
detached
Status Job ID Name Coverage
  Tool Lint
passed #552242
lint
ghc-linters

00:01:01

passed #552243
lint
lint-linters

00:00:14

passed #552246
lint
lint-submods

00:00:23

passed #552244
lint
lint-testsuite

00:00:16

passed #552245
lint
typecheck-testsuite

00:00:15

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

00:30:23

 
  Lint
passed #552248
lint
lint-base

00:22:01

 
  Build
passed #552249
x86_64-linux
stack-hadrian-build

00:21:46

passed #552542
x86_64-linux
validate-x86_64-linux-deb9-hadrian

01:55:10

failed #552250
x86_64-linux
validate-x86_64-linux-deb9-hadrian

05:00:00

 
  Full Build
failed #552253
aarch64-linux allowed to fail
validate-aarch64-linux-deb10

01:01:35

failed #552254
armv7-linux allowed to fail
validate-armv7-linux-deb10

03:26:54

passed #552255
x86_64-linux
validate-i386-linux-deb9

01:38:30

passed #552252
x86_64-darwin
validate-x86_64-darwin

01:12:02

failed #552256
x86_64-linux
validate-x86_64-linux-deb9-debug

00:20:30

passed #552259
x86_64-linux
validate-x86_64-linux-deb9-dwarf

01:50:47

failed #552257
x86_64-linux
validate-x86_64-linux-deb9-integer-simple

00:19:41

manual #552258
x86_64-linux allowed to fail manual
validate-x86_64-linux-deb9-tsan
passed #552251
x86_64-linux
validate-x86_64-linux-deb9-unreg-hadrian

03:22:42

passed #552260
x86_64-linux
validate-x86_64-linux-fedora27

02:11:46

passed #552261
new-x86_64-windows test
validate-x86_64-windows-hadrian

03:36:23

 
  Packaging
skipped #552262
x86_64-linux
doc-tarball
 
  Testing
manual #552263
x86_64-linux allowed to fail manual
hackage
skipped #552265
x86_64-linux-perf
perf
skipped #552264
x86_64-linux
perf-nofib
 
Name Stage Failure
failed
validate-x86_64-linux-deb9-integer-simple Full Build
make -j4 -Werror V=0 failed
Running after_script
Running after script...
$ cp -Rf $HOME/.cabal cabal-cache
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
validate-x86_64-linux-deb9-debug Full Build
Uploading artifacts...
WARNING: ghc-x86_64-deb9-linux-debug.tar.xz: no matching files
WARNING: junit.xml: no matching files
WARNING: performance-metrics.tsv: no matching files
ERROR: No files to upload
Uploading artifacts...
WARNING: junit.xml: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1
failed
validate-aarch64-linux-deb10 Full Build
Uploading artifacts...
WARNING: ghc-aarch64-linux-deb10.tar.xz: no matching files
WARNING: junit.xml: no matching files
WARNING: performance-metrics.tsv: no matching files
ERROR: No files to upload
Uploading artifacts...
WARNING: junit.xml: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1
failed
validate-armv7-linux-deb10 Full Build
Uploading artifacts...
ghc-armv7-linux-deb10.tar.xz: found 1 matching files

junit.xml: found 1 matching files

performance-metrics.tsv: found 1 matching files

Uploading artifacts to coordinator... ok
id=552254 responseStatus=201 Created token=6Jms7_rn
Uploading artifacts...
junit.xml: found 1 matching files

Uploading artifacts to coordinator... ok
id=552254 responseStatus=201 Created token=6Jms7_rn
ERROR: Job failed: exit code 1