Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 42 for uintptr (0.38 sec)

  1. src/cmd/cgo/internal/test/cthread_windows.c

    addThread(void *p)
    {
    	int i, max;
    	
    	max = *(int*)p;
    	for(i=0; i<max; i++)
    		Add(i);
    	return 0;
    }
    
    void
    doAdd(int max, int nthread)
    {
    	enum { MaxThread = 20 };
    	int i;
    	uintptr_t thread_id[MaxThread];
    	
    	if(nthread > MaxThread)
    		nthread = MaxThread;
    	for(i=0; i<nthread; i++)
    		thread_id[i] = _beginthreadex(0, 0, addThread, &max, 0, 0);
    	for(i=0; i<nthread; i++) {
    C
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed May 17 21:53:11 GMT 2023
    - 1.1K bytes
    - Viewed (0)
  2. cni/pkg/nodeagent/fakes_test.go

    	return nil
    }
    
    // fakeNs is a mock struct for testing
    type fakeNs struct {
    	closed *atomic.Bool
    	fd     uintptr
    	inode  uint64
    }
    
    func newFakeNs(fd uintptr) *fakeNs {
    	// the fake inode is the fd! magic.
    	return &fakeNs{closed: &atomic.Bool{}, fd: fd, inode: uint64(fd)}
    }
    
    func newFakeNsInode(fd uintptr, inode uint64) *fakeNs {
    	return &fakeNs{closed: &atomic.Bool{}, fd: fd, inode: inode}
    }
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  3. internal/disk/stat_windows.go

    	//   _Out_ LPDWORD lpTotalNumberOfClusters
    	// );
    	_, _, _ = GetDiskFreeSpace.Call(uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(path))),
    		uintptr(unsafe.Pointer(&lpSectorsPerCluster)),
    		uintptr(unsafe.Pointer(&lpBytesPerSector)),
    		uintptr(unsafe.Pointer(&lpNumberOfFreeClusters)),
    		uintptr(unsafe.Pointer(&lpTotalNumberOfClusters)))
    
    	info.Files = uint64(lpTotalNumberOfClusters)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Feb 26 19:34:50 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  4. api/except.txt

    pkg syscall (windows-386), type AddrinfoW struct, Addr uintptr
    pkg syscall (windows-386), type CertChainPolicyPara struct, ExtraPolicyPara uintptr
    pkg syscall (windows-386), type CertChainPolicyStatus struct, ExtraPolicyStatus uintptr
    pkg syscall (windows-386), type CertContext struct, CertInfo uintptr
    pkg syscall (windows-386), type CertRevocationInfo struct, CrlInfo uintptr
    Plain Text
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Thu May 25 00:13:30 GMT 2023
    - 34.6K bytes
    - Viewed (0)
  5. cni/pkg/nodeagent/netns.go

    // limitations under the License.
    
    package nodeagent
    
    import "io"
    
    type NetnsFd interface {
    	Fd() uintptr
    }
    
    type Netns interface {
    	NetnsFd
    	Inode() uint64
    }
    type NetnsCloser interface {
    	io.Closer
    	Netns
    }
    
    type NetnsWithFd struct {
    	netns io.Closer
    	fd    uintptr
    	inode uint64
    }
    
    func (n *NetnsWithFd) Close() error {
    	if n.netns == nil {
    		return nil
    	}
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 1.2K bytes
    - Viewed (0)
  6. src/cmd/cgo/internal/test/issue21897.go

    	//fmt.Printf("CFNumberRef: %x\n", uintptr(unsafe.Pointer(xCFNumberRef)))
    }
    
    var xCFNumberRef C.CFNumberRef
    
    func testCFDateRef() {
    	xCFDateRef = C.CFDateCreate(C.kCFAllocatorSystemDefault, 0) // 0 value is 1 Jan 2001 00:00:00 GMT
    	//fmt.Printf("CFDateRef: %x\n", uintptr(unsafe.Pointer(xCFDateRef)))
    }
    
    var xCFDateRef C.CFDateRef
    
    func testCFBooleanRef() {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:02 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  7. internal/lock/lock_windows.go

    func lockFileEx(h syscall.Handle, flags, locklow, lockhigh uint32, ol *syscall.Overlapped) (err error) {
    	reserved := uint32(0)
    	r1, _, e1 := syscall.Syscall6(procLockFileEx.Addr(), 6, uintptr(h), uintptr(flags),
    		uintptr(reserved), uintptr(locklow), uintptr(lockhigh), uintptr(unsafe.Pointer(ol)))
    	if r1 == 0 {
    		if e1 != 0 {
    			err = error(e1)
    		} else {
    			err = syscall.EINVAL
    		}
    	}
    	return
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Oct 18 18:08:15 GMT 2023
    - 7.9K bytes
    - Viewed (0)
  8. src/cmd/cgo/internal/test/issue24161res/restype.go

    #include <CoreFoundation/CoreFoundation.h>
    */
    import "C"
    import (
    	"reflect"
    	"testing"
    )
    
    func Test(t *testing.T) {
    	if k := reflect.TypeOf(C.CFArrayCreate(0, nil, 0, nil)).Kind(); k != reflect.Uintptr {
    		t.Fatalf("bad kind %s\n", k)
    	}
    Go
    - Registered: Tue Mar 26 11:13:08 GMT 2024
    - Last Modified: Fri May 12 12:00:02 GMT 2023
    - 486 bytes
    - Viewed (0)
  9. src/cmd/cgo/internal/test/issue27054/test27054.go

    package issue27054
    
    /*
    #include "egl.h"
    */
    import "C"
    import (
    	"testing"
    )
    
    func Test27054(t *testing.T) {
    	var (
    		// Note: 0, not nil. That makes sure we use uintptr for these types.
    		_ C.EGLDisplay = 0
    		_ C.EGLConfig  = 0
    	)
    Go
    - Registered: Tue Mar 26 11:13:08 GMT 2024
    - Last Modified: Fri May 12 12:00:02 GMT 2023
    - 393 bytes
    - Viewed (0)
  10. cni/pkg/nodeagent/pod_cache_test.go

    	}
    	if nil != p.Take(string(pod.UID)) {
    		// expect nil because we already took it
    		t.Fatalf("Expected nil Netns for the same uid twice")
    	}
    }
    
    var counter atomic.Int64
    
    func inc() uintptr {
    	return uintptr(counter.Add(1))
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 4.2K bytes
    - Viewed (0)
Back to top