OS_OBJECT_DECL_CLASS(dispatch_object);
void
_dispatch_object_validate(dispatch_object_t object) {
void *isa = *(void* volatile*)(OS_OBJECT_BRIDGE void*)object;
(void)isa;
}
typedef struct dispatch_object_s {
private:
dispatch_object_s();
~dispatch_object_s();
dispatch_object_s(const dispatch_object_s &);
void operator=(const dispatch_object_s &);
} *dispatch_object_t;
typedef union {
struct _os_object_s *_os_obj;
struct dispatch_object_s *_do;
struct dispatch_continuation_s *_dc;
struct dispatch_queue_s *_dq;
struct dispatch_queue_attr_s *_dqa;
struct dispatch_group_s *_dg;
struct dispatch_source_s *_ds;
struct dispatch_mach_s *_dm;
struct dispatch_mach_msg_s *_dmsg;
struct dispatch_timer_aggregate_s *_dta;
struct dispatch_source_attr_s *_dsa;
struct dispatch_semaphore_s *_dsema;
struct dispatch_data_s *_ddata;
struct dispatch_io_s *_dchannel;
struct dispatch_operation_s *_doperation;
struct dispatch_disk_s *_ddisk;
} dispatch_object_t __attribute__((__transparent_union__));
*/
typedef void (^dispatch_block_t)(void);
void
dispatch_retain(dispatch_object_t object);
void
dispatch_release(dispatch_object_t object);
void *_Nullable
dispatch_get_context(dispatch_object_t object);
void
dispatch_set_context(dispatch_object_t object, void *_Nullable context);
void
dispatch_set_finalizer_f(dispatch_object_t object,
dispatch_function_t _Nullable finalizer);
void
dispatch_activate(dispatch_object_t object);
void
dispatch_suspend(dispatch_object_t object);
void
dispatch_resume(dispatch_object_t object);
long
dispatch_wait(void *object, dispatch_time_t timeout);
void
dispatch_notify(void *object, dispatch_object_t queue,
dispatch_block_t notification_block);
void
dispatch_cancel(void *object);
long
dispatch_testcancel(void *object);
__attribute__((__format__(printf,2,3)))
void
dispatch_debug(dispatch_object_t object, const char *message, ...);
__attribute__((__format__(printf,2,0)))
void
dispatch_debugv(dispatch_object_t object, const char *message, va_list ap);
object.h
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 1.const data = obj;原状console.log(data) // [object, objec...
- 1. apply() apply()调用一个方法,其具有一个指定的this值,以及作为一个数组(或类似于数组的参数...
- 针对模块度(modularity)的一些理解 模块度是评估一个社区网络划分好坏的度量方法,它的意思是社区内节点的连...