Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for _beginthread (0.17 sec)

  1. src/runtime/cgo/libcgo_windows.h

    // Copyright 2020 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Call _beginthread, aborting on failure.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 09 18:17:39 UTC 2022
    - 258 bytes
    - Viewed (0)
  2. src/runtime/cgo/gcc_libinit_windows.c

    	LeaveCriticalSection(&runtime_init_cs);
    	return ret;
    }
    
    void _cgo_beginthread(void (*func)(void*), void* arg) {
    	int tries;
    	uintptr_t thandle;
    
    	for (tries = 0; tries < 20; tries++) {
    		thandle = _beginthread(func, 0, arg);
    		if (thandle == -1 && errno == EACCES) {
    			// "Insufficient resources", try again in a bit.
    			//
    			// Note that the first Sleep(0) is a yield.
    			Sleep(tries); // milliseconds
    			continue;
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 17 21:53:11 UTC 2023
    - 4.2K bytes
    - Viewed (0)
  3. src/runtime/testdata/testprogcgo/threadpanic_windows.c

    #include <stdio.h>
    
    void gopanic(void);
    
    static unsigned int __attribute__((__stdcall__))
    die(void* x)
    {
    	gopanic();
    	return 0;
    }
    
    void
    start(void)
    {
    	if(_beginthreadex(0, 0, die, 0, 0, 0) != 0)
    		printf("_beginthreadex failed\n");
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 10 23:11:44 UTC 2016
    - 435 bytes
    - Viewed (0)
  4. src/cmd/cgo/internal/test/cthread_windows.c

    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++) {
    		WaitForSingleObject((HANDLE)thread_id[i], INFINITE);
    		CloseHandle((HANDLE)thread_id[i]);
    	}
    }
    
    __stdcall
    static unsigned int
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 17 21:53:11 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  5. src/runtime/testdata/testprogcgo/trace_windows.c

    __stdcall
    static unsigned int cCalledFromCThread(void *p) {
    	goCalledFromCThread();
    	return 0;
    }
    
    void cCalledFromGo(void) {
    	goCalledFromC();
    
    	uintptr_t thread;
    	thread = _beginthreadex(NULL, 0, cCalledFromCThread, NULL, 0, NULL);
    	WaitForSingleObject((HANDLE)thread, INFINITE);
    	CloseHandle((HANDLE)thread);
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 30 19:18:12 UTC 2023
    - 777 bytes
    - Viewed (0)
Back to top