Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for __sync_add_and_fetch (0.23 sec)

  1. src/runtime/testdata/testprogcgo/tracebackctxt_c.c

    static int contextCount;
    
    int getContextCount() {
    	return __sync_add_and_fetch(&contextCount, 0);
    }
    
    void tcContext(void* parg) {
    	struct cgoContextArg* arg = (struct cgoContextArg*)(parg);
    	if (arg->context == 0) {
    		arg->context = __sync_add_and_fetch(&contextCount, 1);
    	} else {
    		if (arg->context != __sync_add_and_fetch(&contextCount, 0)) {
    			abort();
    		}
    		__sync_sub_and_fetch(&contextCount, 1);
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 29 15:30:38 UTC 2021
    - 2.3K bytes
    - Viewed (0)
Back to top