// Spinlock.cpp: implementation of the CSpinlock class.
//
//////////////////////////////////////////////////////////////////////

#include "Spinlock.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CSpinlock::CSpinlock()
{
	memset((void*)&m_SpinLock,0,sizeof(m_SpinLock));
	NdisAllocateSpinLock(&m_SpinLock);
}

CSpinlock::~CSpinlock()
{
	NdisFreeSpinLock(&m_SpinLock);
}


void CSpinlock::Lock(void)
{
	NdisAcquireSpinLock(&m_SpinLock);
}

void CSpinlock::Release(void)
{
	NdisReleaseSpinLock(&m_SpinLock);
}