Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 73 for tv_nsec (0.15 sec)

  1. src/runtime/os3_solaris.go

    		throw("sem_init")
    	}
    	mp.waitsema = uintptr(unsafe.Pointer(sem))
    }
    
    //go:nosplit
    func semasleep(ns int64) int32 {
    	mp := getg().m
    	if ns >= 0 {
    		mp.ts.tv_sec = ns / 1000000000
    		mp.ts.tv_nsec = ns % 1000000000
    
    		mp.libcall.fn = uintptr(unsafe.Pointer(&libc_sem_reltimedwait_np))
    		mp.libcall.n = 2
    		mp.scratch = mscratch{}
    		mp.scratch.v[0] = mp.waitsema
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  2. src/runtime/cgo/gcc_libinit.c

    		err = pthread_create(thread, attr, pfn, arg);
    		if (err == 0) {
    			pthread_detach(*thread);
    			return 0;
    		}
    		if (err != EAGAIN) {
    			return err;
    		}
    		ts.tv_sec = 0;
    		ts.tv_nsec = (tries + 1) * 1000 * 1000; // Milliseconds.
    		nanosleep(&ts, nil);
    	}
    	return EAGAIN;
    }
    
    static void
    pthread_key_destructor(void* g) {
    	if (x_crosscall2_ptr != NULL) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 01:07:18 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  3. src/cmd/cgo/internal/testcshared/testdata/main4.c

    		die("kill");
    	}
    
    	if (verbose) {
    		fprintf(stderr, "waiting for sigioSeen\n");
    	}
    
    	// Wait until the signal has been delivered.
    	i = 0;
    	while (!sigioSeen) {
    		ts.tv_sec = 0;
    		ts.tv_nsec = 1000000;
    		nanosleep(&ts, NULL);
    		i++;
    		if (i > 5000) {
    			fprintf(stderr, "looping too long waiting for signal\n");
    			exit(EXIT_FAILURE);
    		}
    	}
    
    	if (verbose) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 14 13:19:50 UTC 2023
    - 4.2K bytes
    - Viewed (0)
  4. src/runtime/vdso_test.go

    const vdsoCProgram = `
    #include <stdio.h>
    #include <time.h>
    
    int main() {
    	int i;
    	time_t tot;
    	for (i = 0; i < 100; i++) {
    		struct timespec ts;
    		clock_gettime(CLOCK_MONOTONIC, &ts);
    		tot += ts.tv_nsec;
    	}
    	printf("%d\n", (int)(tot));
    	return 0;
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 17 19:47:47 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  5. src/runtime/os_solaris.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package runtime
    
    import "unsafe"
    
    type mts struct {
    	tv_sec  int64
    	tv_nsec int64
    }
    
    type mscratch struct {
    	v [6]uintptr
    }
    
    type mOS struct {
    	waitsema uintptr // semaphore for parking on locks
    	perrno   *int32  // pointer to tls errno
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 06 18:49:01 UTC 2023
    - 6.6K bytes
    - Viewed (0)
  6. src/runtime/sys_linux_386.s

    noswitch:
    	SUBL	$16, SP		// Space for results
    	ANDL	$~15, SP	// Align for C code
    
    	// Stack layout, depending on call path:
    	//  x(SP)   vDSO            INVOKE_SYSCALL
    	//    12    ts.tv_nsec      ts.tv_nsec
    	//     8    ts.tv_sec       ts.tv_sec
    	//     4    &ts             -
    	//     0    CLOCK_<id>      -
    
    	MOVL	runtime·vdsoClockgettimeSym(SB), AX
    	CMPL	AX, $0
    	JEQ	fallback
    
    	LEAL	8(SP), BX	// &ts (struct timespec)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 24 18:53:44 UTC 2023
    - 17.9K bytes
    - Viewed (0)
  7. src/runtime/sys_freebsd_386.s

    	JAE	2(PC)
    	MOVL	$0xf1, 0xf1  // crash
    	RET
    
    TEXT runtime·usleep(SB),NOSPLIT,$20
    	MOVL	$0, DX
    	MOVL	usec+0(FP), AX
    	MOVL	$1000000, CX
    	DIVL	CX
    	MOVL	AX, 12(SP)		// tv_sec
    	MOVL	$1000, AX
    	MULL	DX
    	MOVL	AX, 16(SP)		// tv_nsec
    
    	MOVL	$0, 0(SP)
    	LEAL	12(SP), AX
    	MOVL	AX, 4(SP)		// arg 1 - rqtp
    	MOVL	$0, 8(SP)		// arg 2 - rmtp
    	MOVL	$SYS_nanosleep, AX
    	INT	$0x80
    	RET
    
    /*
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 06 18:49:01 UTC 2023
    - 9.4K bytes
    - Viewed (0)
  8. src/runtime/sys_netbsd_amd64.s

    	MOVL	AX, ret+24(FP)
    	RET
    
    TEXT runtime·usleep(SB),NOSPLIT,$16
    	MOVL	$0, DX
    	MOVL	usec+0(FP), AX
    	MOVL	$1000000, CX
    	DIVL	CX
    	MOVQ	AX, 0(SP)		// tv_sec
    	MOVL	$1000, AX
    	MULL	DX
    	MOVQ	AX, 8(SP)		// tv_nsec
    
    	MOVQ	SP, DI			// arg 1 - rqtp
    	MOVQ	$0, SI			// arg 2 - rmtp
    	MOVL	$SYS___nanosleep50, AX
    	SYSCALL
    	RET
    
    TEXT runtime·lwp_kill(SB),NOSPLIT,$0-16
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 06 18:49:01 UTC 2023
    - 9.8K bytes
    - Viewed (0)
  9. src/runtime/sys_dragonfly_amd64.s

    	JCC	2(PC)
    	MOVL	$0xf1, 0xf1  // crash
    	RET
    
    TEXT runtime·usleep(SB),NOSPLIT,$16
    	MOVL	$0, DX
    	MOVL	usec+0(FP), AX
    	MOVL	$1000000, CX
    	DIVL	CX
    	MOVQ	AX, 0(SP)		// tv_sec
    	MOVL	$1000, AX
    	MULL	DX
    	MOVQ	AX, 8(SP)		// tv_nsec
    
    	MOVQ	SP, DI			// arg 1 - rqtp
    	MOVQ	$0, SI			// arg 2 - rmtp
    	MOVL	$240, AX		// sys_nanosleep
    	SYSCALL
    	RET
    
    // set tls base to DI
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 06 18:49:01 UTC 2023
    - 8.3K bytes
    - Viewed (0)
  10. src/runtime/sys_netbsd_386.s

    	MOVL	AX, ret+12(FP)
    	RET
    
    TEXT runtime·usleep(SB),NOSPLIT,$24
    	MOVL	$0, DX
    	MOVL	usec+0(FP), AX
    	MOVL	$1000000, CX
    	DIVL	CX
    	MOVL	AX, 12(SP)		// tv_sec - l32
    	MOVL	$0, 16(SP)		// tv_sec - h32
    	MOVL	$1000, AX
    	MULL	DX
    	MOVL	AX, 20(SP)		// tv_nsec
    
    	MOVL	$0, 0(SP)
    	LEAL	12(SP), AX
    	MOVL	AX, 4(SP)		// arg 1 - rqtp
    	MOVL	$0, 8(SP)		// arg 2 - rmtp
    	MOVL	$SYS___nanosleep50, AX
    	INT	$0x80
    	RET
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 06 18:49:01 UTC 2023
    - 9.6K bytes
    - Viewed (0)
Back to top