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)
{
* 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();
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
int32 dying;
int32 profilehz;
int32 helpgc;
- bool blockingsyscall;
bool spinning;
uint32 fastrand;
uint64 ncgocall; // number of cgo calls in total