]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: remove unused scheduler knob
authorDmitriy Vyukov <dvyukov@google.com>
Sun, 4 Aug 2013 19:32:40 +0000 (23:32 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Sun, 4 Aug 2013 19:32:40 +0000 (23:32 +0400)
Blockingsyscall was used in net package on windows,
it's not used anymore.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12436043

src/pkg/runtime/cgocall.c
src/pkg/runtime/runtime.h

index 07aef495cf6b9de665deec4d130e0d5d3701192b..91a55131e6aa47a61648ac8d3e374ccc153f0522 100644 (file)
@@ -98,15 +98,6 @@ static void unwindm(void);
 static void endcgo(void);
 static FuncVal endcgoV = { endcgo };
 
-// Gives a hint that the next syscall
-// executed by the current goroutine will block.
-// Currently used only on windows.
-void
-net·runtime_blockingSyscallHint(void)
-{
-       g->blockingsyscall = true;
-}
-
 void
 runtime·cgocall(void (*fn)(void*), void *arg)
 {
@@ -158,11 +149,7 @@ runtime·cgocall(void (*fn)(void*), void *arg)
         * so it is safe to call while "in a system call", outside
         * the $GOMAXPROCS accounting.
         */
-       if(g->blockingsyscall) {
-               g->blockingsyscall = false;
-               runtime·entersyscallblock();
-       } else
-               runtime·entersyscall();
+       runtime·entersyscall();
        runtime·asmcgocall(fn, arg);
        runtime·exitsyscall();
 
index 705845d3f19b509c886ac8c220aae8f8d6abd85a..1ecdfffcab03a0576abd51d7385fbb24083df8ac 100644 (file)
@@ -269,7 +269,6 @@ struct      G
        bool    ispanic;
        bool    issystem;       // do not output in stack dump
        bool    isbackground;   // ignore in deadlock detector
-       bool    blockingsyscall;        // hint that the next syscall will block
        bool    preempt;        // preemption signal, duplicates stackguard0 = StackPreempt
        int8    raceignore;     // ignore race detection events
        M*      m;              // for debuggers, but offset not hard-coded
@@ -313,7 +312,6 @@ struct      M
        int32   dying;
        int32   profilehz;
        int32   helpgc;
-       bool    blockingsyscall;
        bool    spinning;
        uint32  fastrand;
        uint64  ncgocall;       // number of cgo calls in total