Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
/ druntime Public archive
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/memory.d
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
*
* Notes_to_implementors:
* $(UL
* $(LI On POSIX systems, the signals SIGUSR1 and SIGUSR2 are reserved
* $(LI On POSIX systems, the signals `SIGRTMIN` and `SIGRTMIN + 1` are reserved
* by this module for use in the garbage collector implementation.
* Typically, they will be used to stop and resume other threads
* when performing a collection, but an implementation may choose
Expand Down
7 changes: 4 additions & 3 deletions src/core/thread.d
Original file line number Diff line number Diff line change
Expand Up @@ -1908,7 +1908,7 @@ version( CoreDdoc )
{
/**
* Instruct the thread module, when initialized, to use a different set of
* signals besides SIGUSR1 and SIGUSR2 for suspension and resumption of threads.
* signals besides `SIGRTMIN` and `SIGRTMIN + 1` for suspension and resumption of threads.
* This function should be called at most once, prior to thread_init().
* This function is Posix-only.
*/
Expand Down Expand Up @@ -1966,12 +1966,13 @@ extern (C) void thread_init()
{
if( suspendSignalNumber == 0 )
{
suspendSignalNumber = SIGUSR1;
suspendSignalNumber = SIGRTMIN;
}

if( resumeSignalNumber == 0 )
{
resumeSignalNumber = SIGUSR2;
resumeSignalNumber = SIGRTMIN + 1;
assert(resumeSignalNumber <= SIGRTMAX);
}

int status;
Expand Down