Forked from
Glasgow Haskell Compiler / GHC
7892 commits behind, 629 commits ahead of the upstream repository.
-
David Feuer authored
Long ago, the stable name table and stable pointer tables were one. Now, they are separate, and have significantly different implementations. I believe the time has come to finish the split that began in #7674. * Divide `rts/Stable` into `rts/StableName` and `rts/StablePtr`. * Give each table its own mutex. * Add FFI functions `hs_lock_stable_ptr_table` and `hs_unlock_stable_ptr_table` and document them. These are intended to replace the previously undocumented `hs_lock_stable_tables` and `hs_lock_stable_tables`, which are now documented as deprecated synonyms. * Make `eqStableName#` use pointer equality instead of unnecessarily comparing stable name table indices. Reviewers: simonmar, bgamari, erikd Reviewed By: bgamari Subscribers: rwbarton, carter GHC Trac Issues: #15555 Differential Revision: https://phabricator.haskell.org/D5084
David Feuer authoredLong ago, the stable name table and stable pointer tables were one. Now, they are separate, and have significantly different implementations. I believe the time has come to finish the split that began in #7674. * Divide `rts/Stable` into `rts/StableName` and `rts/StablePtr`. * Give each table its own mutex. * Add FFI functions `hs_lock_stable_ptr_table` and `hs_unlock_stable_ptr_table` and document them. These are intended to replace the previously undocumented `hs_lock_stable_tables` and `hs_lock_stable_tables`, which are now documented as deprecated synonyms. * Make `eqStableName#` use pointer equality instead of unnecessarily comparing stable name table indices. Reviewers: simonmar, bgamari, erikd Reviewed By: bgamari Subscribers: rwbarton, carter GHC Trac Issues: #15555 Differential Revision: https://phabricator.haskell.org/D5084
TopHandler.h 687 B
/* -----------------------------------------------------------------------------
*
* (c) The GHC Team, 2016
*
* Top-level handler support
*
* ---------------------------------------------------------------------------*/
#pragma once
#include <BeginPrivate.h>
#include <rts/Types.h>
#include <rts/storage/Closures.h>
#include <stg/Types.h>
// Initialize the top handler subsystem
void initTopHandler(void);
// Exit the top handler subsystem
void exitTopHandler(void);
// Get the thread that handles ctrl-c, etc
// Returns NULL if there is no such thread
StgTSO *getTopHandlerThread(void);
#include <EndPrivate.h>
// Called from Haskell
void rts_setMainThread(StgWeak *ptr);