• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/libdispatch-442.1.4/src/

Lines Matching defs:dc

270 	dispatch_continuation_t dc = _dispatch_continuation_alloc();
272 dc->do_vtable = (void *)((block ? DISPATCH_OBJ_BLOCK_RELEASE_BIT :
275 dc->dc_priority = 0;
276 dc->dc_voucher = NULL;
283 _dispatch_continuation_priority_set(dc,
287 dc->dc_func = _dispatch_call_block_and_release;
289 dc->dc_func = _dispatch_Block_invoke(handler);
291 dc->dc_ctxt = _dispatch_Block_copy(handler);
294 dc->dc_func = handler;
295 dc->dc_ctxt = ds->do_ctxt;
297 _dispatch_trace_continuation_push((dispatch_queue_t)ds, dc);
299 dc->dc_func = NULL;
301 dc->dc_data = (void*)kind;
302 return dc;
309 dispatch_continuation_t dc = dr->ds_handler[kind];
310 if (dc) {
312 if ((long)dc->do_vtable & DISPATCH_OBJ_BLOCK_RELEASE_BIT) {
313 Block_release(dc->dc_ctxt);
316 if (dc->dc_voucher) {
317 _voucher_release(dc->dc_voucher);
318 dc->dc_voucher = NULL;
320 _dispatch_continuation_free(dc);
336 dispatch_continuation_t dc = context;
337 long kind = (long)dc->dc_data;
338 dc->dc_data = 0;
339 if (!dc->dc_func) {
340 _dispatch_continuation_free(dc);
341 dc = NULL;
342 } else if ((long)dc->do_vtable & DISPATCH_OBJ_CTXT_FETCH_BIT) {
343 dc->dc_ctxt = ds->do_ctxt;
345 _dispatch_source_handler_replace(ds->ds_refs, kind, dc);
346 if (kind == DS_EVENT_HANDLER && dc && dc->dc_priority) {
348 ds->dq_priority = dc->dc_priority & ~_PTHREAD_PRIORITY_FLAGS_MASK;
359 dispatch_continuation_t dc;
360 dc = _dispatch_source_handler_alloc(ds, handler, DS_EVENT_HANDLER, true);
361 _dispatch_barrier_trysync_f((dispatch_queue_t)ds, dc,
370 dispatch_continuation_t dc;
371 dc = _dispatch_source_handler_alloc(ds, handler, DS_EVENT_HANDLER, false);
372 _dispatch_barrier_trysync_f((dispatch_queue_t)ds, dc,
380 dispatch_continuation_t dc;
381 dc = _dispatch_source_handler_alloc(ds, handler, DS_EVENT_HANDLER, false);
382 dc->do_vtable = (void *)((long)dc->do_vtable &~DISPATCH_OBJ_CTXT_FETCH_BIT);
383 dc->dc_other = dc->dc_ctxt;
384 dc->dc_ctxt = ctxt;
385 _dispatch_barrier_trysync_f((dispatch_queue_t)ds, dc,
394 dispatch_continuation_t dc;
395 dc = _dispatch_source_handler_alloc(ds, handler, DS_CANCEL_HANDLER, true);
396 _dispatch_barrier_trysync_f((dispatch_queue_t)ds, dc,
405 dispatch_continuation_t dc;
406 dc = _dispatch_source_handler_alloc(ds, handler, DS_CANCEL_HANDLER, false);
407 _dispatch_barrier_trysync_f((dispatch_queue_t)ds, dc,
416 dispatch_continuation_t dc;
417 dc = _dispatch_source_handler_alloc(ds, handler, DS_REGISTN_HANDLER, true);
418 _dispatch_barrier_trysync_f((dispatch_queue_t)ds, dc,
427 dispatch_continuation_t dc;
428 dc = _dispatch_source_handler_alloc(ds, handler, DS_REGISTN_HANDLER, false);
429 _dispatch_barrier_trysync_f((dispatch_queue_t)ds, dc,
440 dispatch_continuation_t dc = dr->ds_handler[DS_REGISTN_HANDLER];
446 if ((long)dc->do_vtable & DISPATCH_OBJ_CTXT_FETCH_BIT) {
447 dc->dc_ctxt = ds->do_ctxt;
449 _dispatch_continuation_pop(dc);
458 dispatch_continuation_t dc = dr->ds_handler[DS_CANCEL_HANDLER];
464 if (!dc) {
471 if ((long)dc->do_vtable & DISPATCH_OBJ_CTXT_FETCH_BIT) {
472 dc->dc_ctxt = ds->do_ctxt;
474 _dispatch_continuation_pop(dc);
488 dispatch_continuation_t dc = dr->ds_handler[DS_EVENT_HANDLER];
497 if (!dispatch_assume(prev) || !dc) {
501 _dispatch_trace_continuation_pop(_dispatch_queue_get_current(), dc);
502 voucher_t voucher = dc->dc_voucher ? _voucher_retain(dc->dc_voucher) : NULL;
503 _dispatch_continuation_voucher_adopt(dc); // consumes voucher reference
504 _dispatch_client_callout(dc->dc_ctxt, dc->dc_func);
505 _dispatch_introspection_queue_item_complete(dc);
506 if (voucher) dc->dc_voucher = voucher;
2500 static const struct dispatch_continuation_s dc = {
2504 (dispatch_continuation_t)&dc;
3528 struct dispatch_object_s *prev, *dc = dou._do;
3529 dc->do_next = NULL;
3531 prev = dispatch_atomic_xchg2o(dr, dm_tail, dc, release);
3533 prev->do_next = dc;
3535 dr->dm_head = dc;
3554 struct dispatch_object_s *dc = NULL, *next_dc = NULL;
3556 _dispatch_wait_until(dc = fastpath(dr->dm_head));
3558 next_dc = fastpath(dc->do_next);
3560 if (!next_dc && !dispatch_atomic_cmpxchg2o(dr, dm_tail, dc, NULL,
3562 _dispatch_wait_until(next_dc = fastpath(dc->do_next));
3565 if (!DISPATCH_OBJ_IS_VTABLE(dc)) {
3566 if ((long)dc->do_vtable & DISPATCH_OBJ_BARRIER_BIT) {
3569 return _dispatch_mach_push(dm, dc,
3570 ((dispatch_continuation_t)dc)->dc_priority);
3573 if (slowpath((long)dc->do_vtable & DISPATCH_OBJ_SYNC_SLOW_BIT)){
3575 (_dispatch_thread_semaphore_t)dc->do_ctxt);
3579 if (slowpath(!_dispatch_mach_reconnect_invoke(dm, dc))) {
3584 _dispatch_voucher_ktrace_dmsg_pop((dispatch_mach_msg_t)dc);
3587 _dispatch_mach_msg_not_sent(dm, dc);
3590 if (slowpath(dc = _dispatch_mach_msg_send(dm, dc)._do)) {
3593 } while ((dc = next_dc));
3597 if (slowpath(dc)) {
3599 !dispatch_atomic_cmpxchg2o(dr, dm_tail, NULL, dc, relaxed)) {
3602 dc->do_next = next_dc;
3604 dr->dm_head = dc;
3771 dispatch_continuation_t dc = _dispatch_continuation_alloc();
3772 dc->do_vtable = (void *)(DISPATCH_OBJ_ASYNC_BIT);
3773 dc->dc_func = (void*)_dispatch_mach_reconnect_invoke;
3774 dc->dc_ctxt = dc;
3775 dc->dc_data = checkin;
3776 dc->dc_other = (void*)(uintptr_t)send;
3777 return _dispatch_mach_send_push(dm, dc);
3786 struct dispatch_object_s dc = {
3790 _dispatch_mach_send_push(dm, &dc);
3849 struct dispatch_continuation_s *dc = ctxt;
3850 void *context = dc->dc_data;
3851 dispatch_function_t barrier = dc->dc_other;
3852 bool send_barrier = ((long)dc->do_vtable & DISPATCH_OBJ_BARRIER_BIT);
3872 dispatch_continuation_t dc = _dispatch_continuation_alloc();
3873 dc->do_vtable = (void *)(DISPATCH_OBJ_ASYNC_BIT | DISPATCH_OBJ_BARRIER_BIT);
3874 dc->dc_func = _dispatch_mach_barrier_invoke;
3875 dc->dc_ctxt = dc;
3876 dc->dc_data = context;
3877 dc->dc_other = barrier;
3878 _dispatch_continuation_voucher_set(dc, 0);
3879 _dispatch_continuation_priority_set(dc, 0, 0);
3884 return _dispatch_mach_send_push(dm, dc);
3887 return _dispatch_mach_push(dm, dc, dc->dc_priority);
3895 dispatch_continuation_t dc = _dispatch_continuation_alloc();
3896 dc->do_vtable = (void *)(DISPATCH_OBJ_ASYNC_BIT);
3897 dc->dc_func = _dispatch_mach_barrier_invoke;
3898 dc->dc_ctxt = dc;
3899 dc->dc_data = context;
3900 dc->dc_other = barrier;
3901 _dispatch_continuation_voucher_set(dc, 0);
3902 _dispatch_continuation_priority_set(dc, 0, 0);
3904 return _dispatch_mach_push(dm, dc, dc->dc_priority);