This repository has been archived by the owner on Oct 12, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 422
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow configuration of the signals used for GC
On Posix systems druntime's GC uses SIGUSR1 and SIGUSR2 to implement suspension of threads for its garbage collector. When integrating D into existing programs written in other languages such as C or C++, SIGUSR1/SIGUSR2 may already have an existing meaning. This allows those programs to use currently unused signals for D's GC, most likely some of the POSIX real time signals where availble. This is acheived by calling thread_setGCSignals prior to thread_init, at most once. If it is not called the runtime will continue to use SIGUSR1 and SIGUSR2. The functionality leaves the choice of signals up to the caller, it does not assume any particular real time signal or that real time signals are available.
- Loading branch information
Showing
1 changed file
with
47 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters