internal byte IncrementSequenceNumber() { byte bret; CMonitor.Enter(_txsequenceNumberLock); bret = _txsequenceNumber++; CMonitor.Exit(_txsequenceNumberLock); return(bret); }
private void SetState() { CMonitor.Enter(lockObject); savedDebugLevel = CrestronLogger.DebugLevel; savedLogOnlyThisLevel = CrestronLogger.LogOnlyCurrentDebugLevel; savedLoggerMode = CrestronLogger.Mode; CrestronLogger.DebugLevel = _debugLevel; CrestronLogger.LogOnlyCurrentDebugLevel = _logOnlyThisLevel; CrestronLogger.Mode = _loggerMode; }
private SocketErrorCodes SendDatagram(byte[] data, int len) { if (client == null) { return(SocketErrorCodes.SOCKET_NOT_CONNECTED); } CMonitor.Enter(_sendDatagramLock); SocketErrorCodes sret = client.SendData(data, len, remoteEndpoint); CMonitor.Exit(_sendDatagramLock); if (sret != SocketErrorCodes.SOCKET_OK) { ErrorLog.Error("SendDatagram: {0}", sret.ToString()); } return(sret); }
internal void ResetSequenceNumber() { CMonitor.Enter(_txsequenceNumberLock); _txsequenceNumber = 0x00; CMonitor.Exit(_txsequenceNumberLock); }
internal void DecrementSingleSequenceNumber() { CMonitor.Enter(_txsequenceNumberLock); _txsequenceNumber--; CMonitor.Exit(_txsequenceNumberLock); }
public void Enter() { CMonitor.Enter(mutex); }
/// <summary> /// Aquire a lock and return the LockToken when the lock is aquired. /// </summary> /// <returns>LockToken object</returns> public LockToken AquireLock() { CMonitor.Enter(_monitorObject); return(new LockToken(this)); }