Lines Matching refs:obj
102 emutls_alloc (struct __emutls_object *obj)
109 if (obj->align <= sizeof (void *))
111 ptr = malloc (obj->size + sizeof (void *));
119 ptr = malloc (obj->size + sizeof (void *) + obj->align - 1);
122 ret = (void *) (((pointer) (ptr + sizeof (void *) + obj->align - 1))
123 & ~(pointer)(obj->align - 1));
127 if (obj->templ)
128 memcpy (ret, obj->templ, obj->size);
130 memset (ret, 0, obj->size);
142 struct __emutls_object *obj = vobj;
146 if (__builtin_expect (obj->loc.ptr == NULL, 0))
147 obj->loc.ptr = emutls_alloc (obj);
148 return obj->loc.ptr;
154 pointer offset = __atomic_load_n (&obj->loc.offset, __ATOMIC_ACQUIRE);
161 offset = obj->loc.offset;
165 __atomic_store_n (&obj->loc.offset, offset, __ATOMIC_RELEASE);
198 ret = emutls_alloc (obj);
209 struct __emutls_object *obj = vobj;
211 if (obj->size < size)
213 obj->size = size;
214 obj->templ = NULL;
216 if (obj->align < align)
217 obj->align = align;
218 if (templ && size == obj->size)
219 obj->templ = templ;