печально быть антисоциальным - Post a comment

Jan. 7th, 2004

[info]smejmoon

06:01 pm - //c++ sux

Kods strādā, vārdi mainīti. Neviens no kolēģiem, kas varētu iedomāties kautko tādu nokopēt, testus neskatās.

Mainīgo vārdi stuff, master un komentārs //c++ sux, paliks kodā, kamēr man neuzlabosies garastāvoklis un es nepārtaisīšu savādāk.




static void DaTest::dongledCopyThread(void* stuff);
void DaTest::magicCopyThread(void* stuff)
{
DaTest* master = (DaTest*) (((void**)stuff)[0]);
Mutex* mutex = (Mutex*) (((void**)stuff)[1]);
mutex->lock();
master->mtMagicCopyTest();
mutex->unlock();
}

TEST_METHOD(DaTest, magicCopyThreadTest)
Mutex* mutex = Threads::createMutex();
void* stuff[2] ;
stuff[0] = (void*) mutex;
stuff[1] = (void*) this;

Threads::startThread(magicCopyThread, stuff);
master->mtMagicCopyTest();
mutex->lock();
mutex->unlock();
}

Read Comments

Reply:

From:
( )Anonymous- this user has disabled anonymous posting.
Username:
Password:
Subject:
No HTML allowed in subject
  
Message:

Notice! This user has turned on the option that logs your IP address when posting.