[pso] [Tema5][Linux]End Request

sorin gsmcreation gsmcreation at yahoo.com
Sat Jun 23 13:28:22 EEST 2007


Salut!

In functia de transfer a requesturilor, as vrea sa nu
completez imediat requestul venit din userspace,
deoarece as vrea sa o prelucrez cu ajutorul schedule
work:

if (write)
{
INIT_WORK (&write_work, write_work_handler, info);
schedule_work (&write_work);
}
else
{
INIT_WORK (&read_work, read_work_handler, info);
schedule_work (&read_work);
}

Info este de tipul unei structuri care incapsuleaza si
request-ul curent.
Daca pun end_request(req, 1) in write_work_handler sau
read_work_handler, se ajunge la deadlock. Singura
varianta care merge este end_request(req, 1) chiar
dupa acest if-else. Care ar fi solutia sa pot apela
end_request(req, 1) mai tarziu totusi?

Multumesc.


 
____________________________________________________________________________________
Now that's room service!  Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097


More information about the pso mailing list