/* * __wt_library_init -- * Some things to do, before we do anything else. */ int __wt_library_init(void) { static int first = 1; WT_DECL_RET; /* * Do per-process initialization once, before anything else, but only * once. I don't know how heavy-weight the function (pthread_once, in * the POSIX world), might be, so I'm front-ending it with a local * static and only using that function to avoid a race. */ if (first) { if ((ret = __wt_once(__wt_global_once)) != 0) __wt_pthread_once_failed = ret; first = 0; } return (__wt_pthread_once_failed); }
/* * __wt_library_init -- * Some things to do, before we do anything else. */ int __wt_library_init(void) { static bool first = true; WT_DECL_RET; /* Check the build matches the machine. */ WT_RET(__endian_check()); /* * Do per-process initialization once, before anything else, but only * once. I don't know how heavy-weight the function (pthread_once, in * the POSIX world), might be, so I'm front-ending it with a local * static and only using that function to avoid a race. */ if (first) { if ((ret = __wt_once(__global_once)) != 0) __wt_pthread_once_failed = ret; first = false; } return (__wt_pthread_once_failed); }