summaryrefslogtreecommitdiff
path: root/compiler/GHC/Builtin/primops.txt.pp
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-08-06 11:51:35 -0400
committerBen Gamari <ben@smart-cactus.org>2022-08-06 11:51:35 -0400
commit6d1700b6dca6defb8768c493a1059c4215749b53 (patch)
tree80dc3968bb4073cd6f06e39a040f32a5a5360e31 /compiler/GHC/Builtin/primops.txt.pp
parentaa818a9f83308d0742e8f8c91cb9878182dacce5 (diff)
downloadhaskell-6d1700b6dca6defb8768c493a1059c4215749b53.tar.gz
rts: Move thread labels into TSO
This eliminates the thread label HashTable and instead tracks this information in the TSO, allowing us to use proper StgArrBytes arrays for backing the label and greatly simplifying management of object lifetimes when we expose them to the user with the coming `threadLabel#` primop.
Diffstat (limited to 'compiler/GHC/Builtin/primops.txt.pp')
-rw-r--r--compiler/GHC/Builtin/primops.txt.pp4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/GHC/Builtin/primops.txt.pp b/compiler/GHC/Builtin/primops.txt.pp
index d59e68626f..13c53b493b 100644
--- a/compiler/GHC/Builtin/primops.txt.pp
+++ b/compiler/GHC/Builtin/primops.txt.pp
@@ -2919,7 +2919,9 @@ primop MyThreadIdOp "myThreadId#" GenPrimOp
has_side_effects = True
primop LabelThreadOp "labelThread#" GenPrimOp
- ThreadId# -> Addr# -> State# RealWorld -> State# RealWorld
+ ThreadId# -> ByteArray# -> State# RealWorld -> State# RealWorld
+ {Set the label of the given thread. The @ByteArray#@ should contain
+ a UTF-8-encoded string.}
with
has_side_effects = True
out_of_line = True