#include <dispatch/once.h> also included by <dispatch/dispatch.h>

dispatch/once.h

for HeaderDoc
4 functions · 3 macros · 1 typedef

typedefdispatch_once_t

typedef intptr_t dispatch_once_t

macroDISPATCH_ONCE_INLINE_FASTPATH

#define DISPATCH_ONCE_INLINE_FASTPATH 1

functiondispatch_once

API_AVAILABLE(macos(10.6), ios(4.0)) DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_NOTHROW DISPATCH_SWIFT3_UNAVAILABLE("Use lazily initialized globals instead") void dispatch_once(
	dispatch_once_t *predicate,
	DISPATCH_NOESCAPE dispatch_block_t block
)
@function dispatch_once @abstract Execute a block once and only once. @param predicate A pointer to a dispatch_once_t that is used to test whether the block has completed or not. @param block The block to execute once. @discussion Always call dispatch_once() before using or testing any variables that are initialized by the block.

macrodispatch_once

#define dispatch_once _dispatch_once

functiondispatch_once_f

API_AVAILABLE(macos(10.6), ios(4.0)) DISPATCH_EXPORT DISPATCH_NONNULL1 DISPATCH_NONNULL3 DISPATCH_NOTHROW DISPATCH_SWIFT3_UNAVAILABLE("Use lazily initialized globals instead") void dispatch_once_f(
	dispatch_once_t *predicate,
	void *_Nullable context,
	dispatch_function_t function
)

function_dispatch_once_f

DISPATCH_INLINE DISPATCH_ALWAYS_INLINE DISPATCH_NONNULL1 DISPATCH_NONNULL3 DISPATCH_NOTHROW DISPATCH_NO_UBSAN DISPATCH_SWIFT3_UNAVAILABLE("Use lazily initialized globals instead") void _dispatch_once_f(
	dispatch_once_t *predicate,
	void *_Nullable context,
	dispatch_function_t function
)

macrodispatch_once_f

#define dispatch_once_f _dispatch_once_f