pwr_tStatus sync_MutexLock ( thread_sMutex *mp ) { #if defined OS_ELN ELN$LOCK_MUTEX(*mp); return SYNC__SUCCESS; #elif defined OS_LYNX && defined PWR_LYNX_30 return errno_Pstatus(pthread_mutex_lock(mp)); #elif defined OS_POSIX return errno_Status(pthread_mutex_lock(mp)); #elif defined OS_VMS return errno_Status(tis_mutex_lock(mp)); #else # error Not defined for this platform ! #endif }
/* ** The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt ** to enter a mutex. If another thread is already within the mutex, ** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return ** SQLITE_BUSY. The sqlite3_mutex_try() interface returns SQLITE_OK ** upon successful entry. Mutexes created using SQLITE_MUTEX_RECURSIVE can ** be entered multiple times by the same thread. In such cases the, ** mutex must be exited an equal number of times before another thread ** can enter. If the same thread tries to enter any other kind of mutex ** more than once, the behavior is undefined. */ static void vmsMutexEnter(sqlite3_mutex *p){ tis_mutex_lock(&p->mutex); }