#include "db_config.h"
#include "db_int.h"
#ifdef HAVE_MUTEX_SUPPORT
#include "dbinc/mutex_int.h"
#endif
void
__os_id(dbenv, pidp, tidp)
DB_ENV *dbenv;
pid_t *pidp;
db_threadid_t *tidp;
{
if (pidp != NULL) {
if (dbenv == NULL) {
#if defined(HAVE_VXWORKS)
*pidp = taskIdSelf();
#else
*pidp = getpid();
#endif
} else
*pidp = dbenv->env->pid_cache;
}
if (tidp != NULL) {
#if defined(DB_WIN32)
*tidp = GetCurrentThreadId();
#elif defined(HAVE_MUTEX_UI_THREADS)
*tidp = thr_self();
#elif defined(HAVE_MUTEX_SOLARIS_LWP) || \
defined(HAVE_MUTEX_PTHREADS) || defined(HAVE_PTHREAD_API)
*tidp = pthread_self();
#else
*tidp = 0;
#endif
}
}