mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-21 06:45:39 -06:00
.autotest: SpinLock
git-svn-id: svn://ultimatepp.org/upp/trunk@8113 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
9c4432f7fa
commit
04d4893d14
1 changed files with 1 additions and 2 deletions
|
|
@ -7,9 +7,8 @@ dword data;
|
|||
|
||||
void AddData()
|
||||
{
|
||||
data_lock.Enter();
|
||||
SpinLock::Lock __(data_lock);
|
||||
data = data + 1;
|
||||
data_lock.Leave();
|
||||
}
|
||||
|
||||
CONSOLE_APP_MAIN
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue