Home | History | Annotate | Download | only in common

Lines Matching refs:instance

27     // TODO: With atomicops.h: void *instance = (void*)Acquire_Load(&fInstance);
29 void *instance=ANNOTATE_UNPROTECTED_READ(fInstance);
32 if(instance!=NULL) {
33 return instance;
36 // Attempt to create the instance.
37 // If a race occurs, then the losing thread will assign its new instance
39 instance=instantiator(context, errorCode);
40 UMTX_RELEASE_BARRIER; // Release-barrier before fInstance=instance;
43 U_ASSERT(instance!=NULL);
45 // TODO: With atomicops.h: Release_Store(&fInstance, (AtomicWord)instance);
47 fInstance=instance;
49 duplicate=instance;
57 * Initial state: Instance creation not attempted yet.
60 * Instance creation succeeded:
63 * Instance creation failed:
65 * We will not attempt again to create the instance.
77 // TODO: With atomicops.h: void *instance = (void*)Acquire_Load(&fInstance);
79 void *instance=ANNOTATE_UNPROTECTED_READ(fInstance);
82 if(instance!=NULL) {
83 // instance was created
84 return instance;
88 // at worst multiple threads race to each create a new instance,
92 // instance creation failed
97 // First attempt to create the instance.
98 // If a race occurs, then the losing thread will assign its new instance
100 instance=instantiator(context, errorCode);
101 UMTX_RELEASE_BARRIER; // Release-barrier before fInstance=instance;
104 // instance creation newly succeeded
105 U_ASSERT(instance!=NULL);
107 // TODO: With atomicops.h: Release_Store(&fInstance, (AtomicWord)instance);
109 fInstance=instance;
110 // Set fErrorCode on the off-chance that a previous instance creation failed.
115 // if we got an instance but its creation failed anyway.
116 duplicate=instance;
118 // instance creation newly failed