Lines Matching refs:context

150 // #pragma mark - user mutex context
225 struct user_mutex_context* context =
227 if (context != NULL)
228 return context;
235 context = new(std::nothrow) user_mutex_context;
236 if (context == NULL)
239 context->lock = RW_LOCK_INITIALIZER("user mutex table");
240 if (context->table.Init() != B_OK) {
241 delete context;
245 team->user_mutex_context = context;
246 return context;
251 delete_user_mutex_context(struct user_mutex_context* context)
253 if (context == NULL)
257 ASSERT(context->table.IsEmpty());
258 delete context;
263 get_user_mutex_entry(struct user_mutex_context* context,
268 tableReadLocker.SetTo(context->lock, false);
270 UserMutexEntry* entry = context->table.Lookup(address);
278 WriteLocker tableWriteLocker(context->lock);
280 entry = context->table.Lookup(address);
295 context->table.Insert(entry);
301 put_user_mutex_entry(struct user_mutex_context* context, UserMutexEntry* entry)
310 WriteLocker tableWriteLocker(context->lock);
313 if (context->table.Lookup(address) != entry)
320 context->table.Remove(entry);
619 struct user_mutex_context* context = contextFetcher.Context();
623 ReadLocker tableReadLocker(context->lock);
624 UserMutexEntry* entry = get_user_mutex_entry(context,
633 put_user_mutex_entry(context, entry);
666 struct user_mutex_context* context = contextFetcher.Context();
668 UserMutexEntry* entry = get_user_mutex_entry(context, contextFetcher.Address());
677 put_user_mutex_entry(context, entry);
692 struct user_mutex_context* context = contextFetcher.Context();
694 UserMutexEntry* entry = get_user_mutex_entry(context,
699 put_user_mutex_entry(context, entry);