fixed little infamous bug that caused the thread_test not to work properly - this scared me as I thought the problem was in the kernel; luckly it wasn't there...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@352 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -20,13 +20,14 @@ struct the_test {
|
||||
static int counter_thread(void *data)
|
||||
{
|
||||
struct the_test *tt = (struct the_test*)data;
|
||||
free(data);
|
||||
|
||||
acquire_sem(tt->the_lock);
|
||||
|
||||
*(tt->current_val) *= tt->thread_mult;
|
||||
|
||||
release_sem(tt->the_lock);
|
||||
|
||||
free(data);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
|
||||
Reference in New Issue
Block a user