[commit: ghc] master: rts: mark 'shutdownCapability' as static (0a2bd9c)

git at git.haskell.org git at git.haskell.org
Sun Feb 7 20:28:44 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/0a2bd9ccf423dd635677926c1238aab5d3d4b1cb/ghc

>---------------------------------------------------------------

commit 0a2bd9ccf423dd635677926c1238aab5d3d4b1cb
Author: Sergei Trofimovich <siarheit at google.com>
Date:   Sun Feb 7 18:39:33 2016 +0000

    rts: mark 'shutdownCapability' as static
    
    Noticed by uselex.rb:
        last_free_capability: [R]: exported from:
            ./rts/dist/build/Capability.o
        shutdownCapability: [R]: exported from:
            ./rts/dist/build/Capability.o
    
    Signed-off-by: Sergei Trofimovich <siarheit at google.com>


>---------------------------------------------------------------

0a2bd9ccf423dd635677926c1238aab5d3d4b1cb
 rts/Capability.c |  4 ++--
 rts/Capability.h | 10 ----------
 2 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/rts/Capability.c b/rts/Capability.c
index 45ee2c8..a2078e5 100644
--- a/rts/Capability.c
+++ b/rts/Capability.c
@@ -51,7 +51,7 @@ Capability **capabilities = NULL;
 // an in-call has a chance of quickly finding a free Capability.
 // Maintaining a global free list of Capabilities would require global
 // locking, so we don't do that.
-Capability *last_free_capability = NULL;
+static Capability *last_free_capability = NULL;
 
 /*
  * Indicates that the RTS wants to synchronise all the Capabilities
@@ -937,7 +937,7 @@ tryGrabCapability (Capability *cap, Task *task)
  *
  * ------------------------------------------------------------------------- */
 
-void
+static void
 shutdownCapability (Capability *cap USED_IF_THREADS,
                     Task *task USED_IF_THREADS,
                     rtsBool safe USED_IF_THREADS)
diff --git a/rts/Capability.h b/rts/Capability.h
index fb9f0aa..561d369 100644
--- a/rts/Capability.h
+++ b/rts/Capability.h
@@ -224,11 +224,6 @@ INLINE_HEADER void releaseCapability_ (Capability* cap STG_UNUSED,
 //
 extern Capability **capabilities;
 
-// The Capability that was last free.  Used as a good guess for where
-// to assign new threads.
-//
-extern Capability *last_free_capability;
-
 //
 // Indicates that the RTS wants to synchronise all the Capabilities
 // for some reason.  All Capabilities should stop and return to the
@@ -304,11 +299,6 @@ extern void grabCapability (Capability **pCap);
 
 #endif /* !THREADED_RTS */
 
-// Waits for a capability to drain of runnable threads and workers,
-// and then acquires it.  Used at shutdown time.
-//
-void shutdownCapability (Capability *cap, Task *task, rtsBool wait_foreign);
-
 // Shut down all capabilities.
 //
 void shutdownCapabilities(Task *task, rtsBool wait_foreign);



More information about the ghc-commits mailing list