OSDN Git Service

Add runtime profiling infrastructure, not yet working.
[pf3gnuchains/gcc-fork.git] / libgo / runtime / sigqueue.goc
index 0f758ac..2e47222 100644 (file)
@@ -51,7 +51,7 @@ static struct {
 void
 siginit(void)
 {
-       noteclear(&sig);
+       runtime_noteclear(&sig);
 }
 
 // Called from sighandler to send a signal back out of the signal handling thread.
@@ -67,11 +67,11 @@ __go_sigsend(int32 s)
                mask = sig.mask;
                if(mask & bit)
                        break;          // signal already in queue
-               if(cas(&sig.mask, mask, mask|bit)) {
+               if(runtime_cas(&sig.mask, mask, mask|bit)) {
                        // Added to queue.
                        // Only send a wakeup for the first signal in each round.
                        if(mask == 0)
-                               notewakeup(&sig);
+                               runtime_notewakeup(&sig);
                        break;
                }
        }
@@ -81,12 +81,12 @@ __go_sigsend(int32 s)
 // Called to receive a bitmask of queued signals.
 func Sigrecv() (m uint32) {
        // runtime·entersyscall();
-       notesleep(&sig);
+       runtime_notesleep(&sig);
        // runtime·exitsyscall();
-       noteclear(&sig);
+       runtime_noteclear(&sig);
        for(;;) {
                m = sig.mask;
-               if(cas(&sig.mask, m, 0))
+               if(runtime_cas(&sig.mask, m, 0))
                        break;
        }
 }
@@ -102,7 +102,7 @@ func Signame(sig int32) (name String) {
                s = buf;
        }
        int32 len = __builtin_strlen(s);
-       unsigned char *data = runtime_mallocgc(len, RefNoPointers, 0, 0);
+       unsigned char *data = runtime_mallocgc(len, FlagNoPointers, 0, 0);
        __builtin_memcpy(data, s, len);
        name.__data = data;
        name.__length = len;