Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for RunSigThread (0.1 sec)

  1. src/cmd/cgo/internal/test/sigprocmask.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build !windows
    
    package cgotest
    
    /*
    #cgo CFLAGS: -pthread
    #cgo LDFLAGS: -pthread
    extern int RunSigThread();
    extern int CheckBlocked();
    */
    import "C"
    import (
    	"os"
    	"os/signal"
    	"syscall"
    	"testing"
    )
    
    var blocked bool
    
    //export IntoGoAndBack
    func IntoGoAndBack() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 12:00:02 UTC 2023
    - 808 bytes
    - Viewed (0)
  2. src/cmd/cgo/internal/test/sigprocmask.c

    }
    
    static void* sigthreadfunc(void* unused) {
    	sigset_t mask;
    	sigemptyset(&mask);
    	sigaddset(&mask, SIGIO);
    	sigprocmask(SIG_BLOCK, &mask, NULL);
    	IntoGoAndBack();
    	return NULL;
    }
    
    int RunSigThread() {
    	int tries;
    	pthread_t thread;
    	int r;
    	struct timespec ts;
    
    	for (tries = 0; tries < 20; tries++) {
    		r = pthread_create(&thread, NULL, &sigthreadfunc, NULL);
    		if (r == 0) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 12:00:02 UTC 2023
    - 1K bytes
    - Viewed (0)
Back to top