Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for ThreadFunc (0.19 sec)

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

    //go:build !android
    
    #include <pthread.h>
    #include <stdio.h>
    #include <unistd.h>
    
    static pthread_t thread;
    
    static void* threadfunc(void* dummy) {
    	while(1) {
    		sleep(1);
    	}
    }
    
    int StartThread() {
    	return pthread_create(&thread, NULL, &threadfunc, NULL);
    }
    
    int CancelThread() {
    	void *r;
    	pthread_cancel(thread);
    	pthread_join(thread, &r);
    	return (r == PTHREAD_CANCELED);
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 12:00:02 UTC 2023
    - 536 bytes
    - Viewed (0)
  2. src/runtime/race/output_test.go

    package main
    
    /*
    #include <pthread.h>
    typedef struct cb {
            int foo;
    } cb;
    extern void goCallback();
    static inline void *threadFunc(void *p) {
    	goCallback();
    	return 0;
    }
    static inline void startThread(cb* c) {
    	pthread_t th;
    	pthread_create(&th, 0, threadFunc, 0);
    }
    */
    import "C"
    
    var done chan bool
    var racy int
    
    //export goCallback
    func goCallback() {
    	racy++
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 25 20:44:25 UTC 2023
    - 9.3K bytes
    - Viewed (0)
  3. testing/performance/src/templates/native-dependents-resources/googleTest/libs/googleTest/1.7.0/include/gtest/internal/gtest-port.h

    // Helper class for testing Google Test's multi-threading constructs.
    // To use it, write:
    //
    //   void ThreadFunc(int param) { /* Do things with param */ }
    //   Notification thread_can_start;
    //   ...
    //   // The thread_can_start parameter is optional; you can supply NULL.
    //   ThreadWithParam<int> thread(&ThreadFunc, 5, &thread_can_start);
    //   thread_can_start.Notify();
    //
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 67.2K bytes
    - Viewed (0)
  4. platforms/documentation/docs/src/snippets/native-binaries/google-test/groovy/libs/googleTest/1.7.0/include/gtest/internal/gtest-port.h

    // Helper class for testing Google Test's multi-threading constructs.
    // To use it, write:
    //
    //   void ThreadFunc(int param) { /* Do things with param */ }
    //   Notification thread_can_start;
    //   ...
    //   // The thread_can_start parameter is optional; you can supply NULL.
    //   ThreadWithParam<int> thread(&ThreadFunc, 5, &thread_can_start);
    //   thread_can_start.Notify();
    //
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 67.2K bytes
    - Viewed (0)
Back to top