Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for pthread_attr_setstacksize (0.45 sec)

  1. src/internal/trace/testdata/testprog/cgo-callback.go

    void go_callback2();
    
    static void *thr(void *arg) {
        go_callback();
        return 0;
    }
    
    static void foo() {
        pthread_t th;
        pthread_attr_t attr;
        pthread_attr_init(&attr);
        pthread_attr_setstacksize(&attr, 256 << 10);
        pthread_create(&th, &attr, thr, 0);
        pthread_join(th, 0);
    }
    
    static void bar() {
        go_callback2();
    }
    */
    import "C"
    
    import (
    	"log"
    	"os"
    	"runtime"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  2. src/cmd/cgo/internal/testsanitizers/testdata/tsan14.go

    void go_callback();
    
    static void *thr(void *arg) {
        go_callback();
        return 0;
    }
    
    static void foo() {
        pthread_t th;
        pthread_attr_t attr;
        pthread_attr_init(&attr);
        pthread_attr_setstacksize(&attr, 256 << 10);
        pthread_create(&th, &attr, thr, 0);
        pthread_join(th, 0);
    }
    */
    import "C"
    
    import (
    	"time"
    )
    
    //export go_callback
    func go_callback() {
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 17 21:53:11 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  3. src/runtime/cgo/gcc_darwin_amd64.c

    	pthread_t p;
    	size_t size;
    	int err;
    
    	sigfillset(&ign);
    	pthread_sigmask(SIG_SETMASK, &ign, &oset);
    
    	size = pthread_get_stacksize_np(pthread_self());
    	pthread_attr_init(&attr);
    	pthread_attr_setstacksize(&attr, size);
    	// Leave stacklo=0 and set stackhi=size; mstart will do the rest.
    	ts->g->stackhi = size;
    	err = _cgo_try_pthread_create(&p, &attr, threadentry, ts);
    
    	pthread_sigmask(SIG_SETMASK, &oset, nil);
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Aug 12 03:56:28 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  4. src/runtime/testdata/testprogcgo/callback.go

    void go_callback();
    
    static void *thr(void *arg) {
        go_callback();
        return 0;
    }
    
    static void foo() {
        pthread_t th;
        pthread_attr_t attr;
        pthread_attr_init(&attr);
        pthread_attr_setstacksize(&attr, 256 << 10);
        pthread_create(&th, &attr, thr, 0);
        pthread_join(th, 0);
    }
    */
    import "C"
    
    import (
    	"fmt"
    	"os"
    	"runtime"
    	"sync/atomic"
    	_ "unsafe" // for go:linkname
    )
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 01 14:05:01 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  5. src/runtime/os_aix.go

    	var (
    		attr pthread_attr
    		oset sigset
    		tid  pthread
    	)
    
    	if pthread_attr_init(&attr) != 0 {
    		throw("pthread_attr_init")
    	}
    
    	if pthread_attr_setstacksize(&attr, threadStackSize) != 0 {
    		throw("pthread_attr_getstacksize")
    	}
    
    	if pthread_attr_setdetachstate(&attr, _PTHREAD_CREATE_DETACHED) != 0 {
    		throw("pthread_attr_setdetachstate")
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  6. src/runtime/cgo/gcc_darwin_arm64.c

    	sigfillset(&ign);
    	pthread_sigmask(SIG_SETMASK, &ign, &oset);
    
    	size = pthread_get_stacksize_np(pthread_self());
    	pthread_attr_init(&attr);
    	pthread_attr_setstacksize(&attr, size);
    	// Leave stacklo=0 and set stackhi=size; mstart will do the rest.
    	ts->g->stackhi = size;
    	err = _cgo_try_pthread_create(&p, &attr, threadentry, ts);
    
    	pthread_sigmask(SIG_SETMASK, &oset, nil);
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 09 03:13:11 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  7. src/runtime/os2_aix.go

    	return int32(r)
    }
    
    //go:nosplit
    func pthread_attr_getstacksize(attr *pthread_attr, size *uint64) int32 {
    	r, _ := syscall2(&libpthread_attr_getstacksize, uintptr(unsafe.Pointer(attr)), uintptr(unsafe.Pointer(size)))
    	return int32(r)
    }
    
    func pthread_attr_setstacksize1(attr uintptr, size uint64) int32
    
    //go:nosplit
    func pthread_attr_setstacksize(attr *pthread_attr, size uint64) int32 {
    	gp := getg()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Dec 14 17:22:18 UTC 2023
    - 20.9K bytes
    - Viewed (0)
  8. src/runtime/sys_openbsd.go

    	KeepAlive(attr)
    	return ret
    }
    func pthread_attr_destroy_trampoline()
    
    //go:nosplit
    //go:cgo_unsafe_args
    func pthread_attr_getstacksize(attr *pthreadattr, size *uintptr) int32 {
    	ret := libcCall(unsafe.Pointer(abi.FuncPCABI0(pthread_attr_getstacksize_trampoline)), unsafe.Pointer(&attr))
    	KeepAlive(attr)
    	KeepAlive(size)
    	return ret
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 30 03:11:18 UTC 2021
    - 2.6K bytes
    - Viewed (0)
  9. src/runtime/cgo/gcc_freebsd.c

    {
    	pthread_attr_t attr;
    	sigset_t ign, oset;
    	pthread_t p;
    	size_t size;
    	int err;
    
    	SIGFILLSET(ign);
    	pthread_sigmask(SIG_SETMASK, &ign, &oset);
    
    	pthread_attr_init(&attr);
    	pthread_attr_getstacksize(&attr, &size);
    	// Leave stacklo=0 and set stackhi=size; mstart will do the rest.
    	ts->g->stackhi = size;
    	err = _cgo_try_pthread_create(&p, &attr, threadentry, ts);
    
    	pthread_sigmask(SIG_SETMASK, &oset, nil);
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 15 03:40:00 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  10. src/runtime/os_openbsd_libc.go

    	var attr pthreadattr
    	if err := pthread_attr_init(&attr); err != 0 {
    		writeErrStr(failthreadcreate)
    		exit(1)
    	}
    
    	// Find out OS stack size for our own stack guard.
    	var stacksize uintptr
    	if pthread_attr_getstacksize(&attr, &stacksize) != 0 {
    		writeErrStr(failthreadcreate)
    		exit(1)
    	}
    	mp.g0.stack.hi = stacksize // for mstart
    
    	// Tell the pthread library we won't join with this thread.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 10 20:44:45 UTC 2022
    - 1.5K bytes
    - Viewed (0)
Back to top