Example #1
0
/*
 * __wt_global_once --
 *	Global initialization, run once.
 */
static void
__wt_global_once(void)
{
	WT_DECL_RET;

	if ((ret = __system_is_little_endian()) != 0) {
		__wt_pthread_once_failed = ret;
		return;
	}

	if ((ret =
	    __wt_spin_init(NULL, &__wt_process.spinlock, "global")) != 0) {
		__wt_pthread_once_failed = ret;
		return;
	}

	__wt_cksum_init();

	TAILQ_INIT(&__wt_process.connqh);

#ifdef HAVE_DIAGNOSTIC
	/* Load debugging code the compiler might optimize out. */
	(void)__wt_breakpoint();
#endif
}
Example #2
0
/*
 * __wt_global_once --
 *	Global initialization, run once.
 */
static void
__wt_global_once(void)
{
	WT_DECL_RET;

	if ((ret = __system_is_little_endian()) != 0) {
		__wt_pthread_once_failed = ret;
		return;
	}

	if ((ret =
	    __wt_spin_init(NULL, &__wt_process.spinlock, "global")) != 0) {
		__wt_pthread_once_failed = ret;
		return;
	}

	__wt_cksum_init();

	TAILQ_INIT(&__wt_process.connqh);

#ifdef HAVE_DIAGNOSTIC
	/* Verify the pre-computed metadata hash. */
	WT_ASSERT(NULL, WT_METAFILE_NAME_HASH ==
	    __wt_hash_city64(WT_METAFILE_URI, strlen(WT_METAFILE_URI)));

	/* Load debugging code the compiler might optimize out. */
	(void)__wt_breakpoint();
#endif
}
Example #3
0
static void
__wt_pthread_once(void)
{
	__wt_spin_init(NULL, &__wt_process.spinlock);

	TAILQ_INIT(&__wt_process.connqh);

#ifdef HAVE_DIAGNOSTIC
	/* Load debugging code the compiler might optimize out. */
	(void)__wt_breakpoint();
#endif
}