Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for _cgo_tsan_acquire (0.26 sec)

  1. src/runtime/cgo/gcc_setenv.c

    //go:build unix
    
    #include "libcgo.h"
    
    #include <stdlib.h>
    
    /* Stub for calling setenv */
    void
    x_cgo_setenv(char **arg)
    {
    	_cgo_tsan_acquire();
    	setenv(arg[0], arg[1], 1);
    	_cgo_tsan_release();
    }
    
    /* Stub for calling unsetenv */
    void
    x_cgo_unsetenv(char **arg)
    {
    	_cgo_tsan_acquire();
    	unsetenv(arg[0]);
    	_cgo_tsan_release();
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 24 22:38:02 UTC 2023
    - 487 bytes
    - Viewed (0)
  2. src/runtime/cgo/gcc_mmap.c

    	void *p;
    
    	_cgo_tsan_acquire();
    	p = mmap(addr, length, prot, flags, fd, offset);
    	_cgo_tsan_release();
    	if (p == MAP_FAILED) {
    		/* This is what the Go code expects on failure.  */
    		return (uintptr_t)errno;
    	}
    	return (uintptr_t)p;
    }
    
    void
    x_cgo_munmap(void *addr, uintptr_t length) {
    	int r;
    
    	_cgo_tsan_acquire();
    	r = munmap(addr, length);
    	_cgo_tsan_release();
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 25 20:58:13 UTC 2023
    - 916 bytes
    - Viewed (0)
  3. src/runtime/cgo/libcgo.h

    extern void __tsan_acquire(void*);
    extern void __tsan_release(void*);
    
    __attribute__ ((unused))
    static void _cgo_tsan_acquire() {
    	__tsan_acquire(&_cgo_sync);
    }
    
    __attribute__ ((unused))
    static void _cgo_tsan_release() {
    	__tsan_release(&_cgo_sync);
    }
    
    #else // !defined(CGO_TSAN)
    
    #define _cgo_tsan_acquire()
    #define _cgo_tsan_release()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 13 20:50:04 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  4. src/runtime/cgo/gcc_stack_darwin.c

    	addr = pthread_get_stackaddr_np(p); // high address (!)
    	size = pthread_get_stacksize_np(p);
    
    	// bounds points into the Go stack. TSAN can't see the synchronization
    	// in Go around stack reuse.
    	_cgo_tsan_acquire();
    	bounds[0] = (uintptr)addr - size;
    	bounds[1] = (uintptr)addr;
    	_cgo_tsan_release();
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 01:32:45 UTC 2024
    - 617 bytes
    - Viewed (0)
  5. src/runtime/cgo/gcc_ppc64x.c

    	}
    }
    
    extern void crosscall_ppc64(void (*fn)(void), void *g);
    
    static void*
    threadentry(void *v)
    {
    	ThreadStart ts;
    
    	ts = *(ThreadStart*)v;
    	_cgo_tsan_acquire();
    	free(v);
    	_cgo_tsan_release();
    
    	// Save g for this thread in C TLS
    	setg_gcc((void*)ts.g);
    
    	crosscall_ppc64(ts.fn, (void*)ts.g);
    	return nil;
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 09 03:13:11 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  6. src/runtime/cgo/gcc_freebsd_amd64.c

    	}
    }
    
    extern void crosscall1(void (*fn)(void), void (*setg_gcc)(void*), void *g);
    static void*
    threadentry(void *v)
    {
    	ThreadStart ts;
    
    	ts = *(ThreadStart*)v;
    	_cgo_tsan_acquire();
    	free(v);
    	_cgo_tsan_release();
    
    	crosscall1(ts.fn, setg_gcc, (void*)ts.g);
    	return nil;
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 22:06:46 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  7. src/runtime/cgo/gcc_util.c

    #include "libcgo.h"
    
    /* Stub for creating a new thread */
    void
    x_cgo_thread_start(ThreadStart *arg)
    {
    	ThreadStart *ts;
    
    	/* Make our own copy that can persist after we return. */
    	_cgo_tsan_acquire();
    	ts = malloc(sizeof *ts);
    	_cgo_tsan_release();
    	if(ts == nil) {
    		fprintf(stderr, "runtime/cgo: out of memory in thread_start\n");
    		abort();
    	}
    	*ts = *arg;
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 16 18:49:38 UTC 2017
    - 1.8K bytes
    - Viewed (0)
  8. src/runtime/cgo/gcc_stack_unix.c

    	addr = __builtin_frame_address(0) + 4096 - size;
    #endif
    	pthread_attr_destroy(&attr);
    
    	// bounds points into the Go stack. TSAN can't see the synchronization
    	// in Go around stack reuse.
    	_cgo_tsan_acquire();
    	bounds[0] = (uintptr)addr;
    	bounds[1] = (uintptr)addr + size;
    	_cgo_tsan_release();
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 03:44:11 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  9. src/runtime/cgo/gcc_linux_amd64.c

    	}
    }
    
    extern void crosscall1(void (*fn)(void), void (*setg_gcc)(void*), void *g);
    static void*
    threadentry(void *v)
    {
    	ThreadStart ts;
    
    	ts = *(ThreadStart*)v;
    	_cgo_tsan_acquire();
    	free(v);
    	_cgo_tsan_release();
    
    	crosscall1(ts.fn, setg_gcc, (void*)ts.g);
    	return nil;
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 22:06:46 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  10. src/runtime/cgo/gcc_freebsd_sigaction.c

    } go_sigaction_t;
    
    int32_t
    x_cgo_sigaction(intptr_t signum, const go_sigaction_t *goact, go_sigaction_t *oldgoact) {
    	int32_t ret;
    	struct sigaction act;
    	struct sigaction oldact;
    	size_t i;
    
    	_cgo_tsan_acquire();
    
    	memset(&act, 0, sizeof act);
    	memset(&oldact, 0, sizeof oldact);
    
    	if (goact) {
    		if (goact->flags & SA_SIGINFO) {
    			act.sa_sigaction = (void(*)(int, siginfo_t*, void*))(goact->handler);
    		} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 24 22:38:02 UTC 2023
    - 2K bytes
    - Viewed (0)
Back to top