}
// When an item is not found, fast versions return a pointer to this zeroed memory.
+#pragma dataflag 16 // no pointers
static uint8 empty_value[MAXVALUESIZE];
// Specialized versions of mapaccess1 for specific types.
runtime·sigprocmask(SIG_BLOCK, &sigset_prof, nil);
}
+#pragma dataflag 16 // no pointers
static int8 badcallback[] = "runtime: cgo callback on thread not created by Go.\n";
// This runs on a foreign stack, without an m or a g. No stack split.
runtime·write(2, badcallback, sizeof badcallback - 1);
}
+#pragma dataflag 16 // no pointers
static int8 badsignal[] = "runtime: signal received on thread not created by Go: ";
// This runs on a foreign stack, without an m or a g. No stack split.
USED(on);
}
+#pragma dataflag 16 // no pointers
static int8 badcallback[] = "runtime: cgo callback on thread not created by Go.\n";
// This runs on a foreign stack, without an m or a g. No stack split.
runtime·write(2, badcallback, sizeof badcallback - 1);
}
+#pragma dataflag 16 // no pointers
static int8 badsignal[] = "runtime: signal received on thread not created by Go: ";
// This runs on a foreign stack, without an m or a g. No stack split.
*rnd = runtime·startup_random_data;
*rnd_len = runtime·startup_random_data_len;
} else {
+ #pragma dataflag 16 // no pointers
static byte urandom_data[HashRandomBytes];
int32 fd;
fd = runtime·open("/dev/urandom", 0 /* O_RDONLY */, 0);
USED(on);
}
+#pragma dataflag 16 // no pointers
static int8 badcallback[] = "runtime: cgo callback on thread not created by Go.\n";
// This runs on a foreign stack, without an m or a g. No stack split.
runtime·write(2, badcallback, sizeof badcallback - 1);
}
+#pragma dataflag 16 // no pointers
static int8 badsignal[] = "runtime: signal received on thread not created by Go: ";
// This runs on a foreign stack, without an m or a g. No stack split.
USED(on);
}
+#pragma dataflag 16 // no pointers
static int8 badcallback[] = "runtime: cgo callback on thread not created by Go.\n";
// This runs on a foreign stack, without an m or a g. No stack split.
runtime·write(2, badcallback, sizeof badcallback - 1);
}
+#pragma dataflag 16 // no pointers
static int8 badsignal[] = "runtime: signal received on thread not created by Go: ";
// This runs on a foreign stack, without an m or a g. No stack split.
USED(on);
}
+#pragma dataflag 16 // no pointers
static int8 badcallback[] = "runtime: cgo callback on thread not created by Go.\n";
// This runs on a foreign stack, without an m or a g. No stack split.
runtime·write(2, badcallback, sizeof badcallback - 1);
}
+#pragma dataflag 16 // no pointers
static int8 badsignal[] = "runtime: signal received on thread not created by Go: ";
// This runs on a foreign stack, without an m or a g. No stack split.
USED(on);
}
+#pragma dataflag 16 // no pointers
static int8 badcallback[] = "runtime: cgo callback on thread not created by Go.\n";
// This runs on a foreign stack, without an m or a g. No stack split.
runtime·pwrite(2, badcallback, sizeof badcallback - 1, -1LL);
}
+#pragma dataflag 16 // no pointers
static int8 badsignal[] = "runtime: signal received on thread not created by Go.\n";
// This runs on a foreign stack, without an m or a g. No stack split.
USED(on);
}
+#pragma dataflag 16 // no pointers
int8 runtime·badcallbackmsg[] = "runtime: cgo callback on thread not created by Go.\n";
int32 runtime·badcallbacklen = sizeof runtime·badcallbackmsg - 1;
+#pragma dataflag 16 // no pointers
int8 runtime·badsignalmsg[] = "runtime: signal received on thread not created by Go.\n";
int32 runtime·badsignallen = sizeof runtime·badsignalmsg - 1;
return s;
}
+static struct
+{
+ String srcstring;
+ int32 aline;
+ int32 delta;
+} *files;
+
+enum { maxfiles = 200 };
+
// walk symtab accumulating path names for use by pc/ln table.
// don't need the full generality of the z entry history stack because
// there are no includes in go (and only sensible includes in our c);
static void
dosrcline(Sym *sym)
{
+ #pragma dataflag 16 // no pointers
static byte srcbuf[1000];
- static struct {
- String srcstring;
- int32 aline;
- int32 delta;
- } files[200];
static int32 incstart;
static int32 nfunc, nfile, nhist;
Func *f;
l = makepath(srcbuf, sizeof srcbuf, sym->name+1);
nhist = 0;
nfile = 0;
- if(nfile == nelem(files))
+ if(nfile == maxfiles)
return;
files[nfile].srcstring = gostringn(srcbuf, l);
files[nfile].aline = 0;
if(srcbuf[0] != '\0') {
if(nhist++ == 0)
incstart = sym->value;
- if(nhist == 0 && nfile < nelem(files)) {
+ if(nhist == 0 && nfile < maxfiles) {
// new top-level file
files[nfile].srcstring = gostringn(srcbuf, l);
files[nfile].aline = sym->value;
splitpcln();
// record src file and line info for each func
+ files = runtime·malloc(maxfiles * sizeof(files[0]));
walksymtab(dosrcline); // pass 1: determine hugestring_len
hugestring.str = runtime·mallocgc(hugestring_len, FlagNoPointers, 0, 0);
hugestring.len = 0;
walksymtab(dosrcline); // pass 2: fill and use hugestring
+ files = nil;
if(hugestring.len != hugestring_len)
runtime·throw("buildfunc: problem in initialization procedure");