/* This implementation assumes that reading or writing an aligned 32-bit integer is an atomic operation. If that assumption is not true, then this routine is not threadsafe.  */
SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag)
/* This implementation assumes that reading or writing an aligned 32-bit integer is an atomic operation. If that assumption is not true, then this routine is not threadsafe.  */
SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag)
{
  wsdStatInit;
  if( op<0 || op>=ArraySize(wsdStat.nowValue) ){
    return SQLITE_MISUSE_BKPT;
  }
  *pCurrent = wsdStat.nowValue[op];
  *pHighwater = wsdStat.mxValue[op];
  if( resetFlag ){
    wsdStat.mxValue[op] = wsdStat.nowValue[op];
  }
  return SQLITE_OK;
}