mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
Convert tabs to spaces because spaces are better. Fight me.
No idea how this one file got formatted with tabs.
This commit is contained in:
parent
3463c977dd
commit
e9f518ddc1
1 changed files with 25 additions and 25 deletions
|
@ -2,35 +2,35 @@
|
||||||
|
|
||||||
namespace LibHac.Os.Impl
|
namespace LibHac.Os.Impl
|
||||||
{
|
{
|
||||||
internal struct InternalCriticalSectionImpl
|
internal struct InternalCriticalSectionImpl
|
||||||
{
|
{
|
||||||
private object _obj;
|
private object _obj;
|
||||||
|
|
||||||
public void Initialize()
|
public void Initialize()
|
||||||
{
|
{
|
||||||
_obj = new object();
|
_obj = new object();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void FinalizeObject() { }
|
public void FinalizeObject() { }
|
||||||
|
|
||||||
public void Enter()
|
public void Enter()
|
||||||
{
|
{
|
||||||
Monitor.Enter(_obj);
|
Monitor.Enter(_obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool TryEnter()
|
public bool TryEnter()
|
||||||
{
|
{
|
||||||
return Monitor.TryEnter(_obj);
|
return Monitor.TryEnter(_obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Leave()
|
public void Leave()
|
||||||
{
|
{
|
||||||
Monitor.Exit(_obj);
|
Monitor.Exit(_obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsLockedByCurrentThread()
|
public bool IsLockedByCurrentThread()
|
||||||
{
|
{
|
||||||
return Monitor.IsEntered(_obj);
|
return Monitor.IsEntered(_obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue