aboutsummaryrefslogtreecommitdiff
path: root/src/pkg
diff options
context:
space:
mode:
authorDmitriy Vyukov <dvyukov@google.com>2014-07-29 14:45:07 +0400
committerDmitriy Vyukov <dvyukov@google.com>2014-07-29 14:45:07 +0400
commit5dab2da9544422d8953b2d3e4a41acaf84a2d2c4 (patch)
tree9dfcd93e54d9d681938d67006904aad394a3122f /src/pkg
parentc0325f50832489f2060549d6b19ce156df45b044 (diff)
downloadgo-5dab2da9544422d8953b2d3e4a41acaf84a2d2c4.tar.xz
runtime: mark global var as NOPTR
LGTM=dave R=golang-codereviews, dave CC=golang-codereviews https://golang.org/cl/119300043
Diffstat (limited to 'src/pkg')
-rw-r--r--src/pkg/runtime/sigqueue.goc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/pkg/runtime/sigqueue.goc b/src/pkg/runtime/sigqueue.goc
index e08bf98aad..376e77a2e4 100644
--- a/src/pkg/runtime/sigqueue.goc
+++ b/src/pkg/runtime/sigqueue.goc
@@ -31,10 +31,12 @@ package runtime
#include "cgocall.h"
#include "../../cmd/ld/textflag.h"
+#pragma textflag NOPTR
static struct {
Note;
uint32 mask[(NSIG+31)/32];
uint32 wanted[(NSIG+31)/32];
+ uint32 recv[(NSIG+31)/32];
uint32 state;
bool inuse;
} sig;
@@ -83,14 +85,13 @@ runtimeĀ·sigsend(int32 s)
// Called to receive the next queued signal.
// Must only be called from a single goroutine at a time.
func signal_recv() (m uint32) {
- static uint32 recv[nelem(sig.mask)];
uint32 i, old, new;
for(;;) {
// Serve from local copy if there are bits left.
for(i=0; i<NSIG; i++) {
- if(recv[i/32]&(1U<<(i&31))) {
- recv[i/32] ^= 1U<<(i&31);
+ if(sig.recv[i/32]&(1U<<(i&31))) {
+ sig.recv[i/32] ^= 1U<<(i&31);
m = i;
goto done;
}
@@ -121,7 +122,7 @@ func signal_recv() (m uint32) {
if(runtimeĀ·cas(&sig.mask[i], m, 0))
break;
}
- recv[i] = m;
+ sig.recv[i] = m;
}
}