[pso] work_struct::data
Razvan Deaconescu
razvand at cs.pub.ro
Thu May 15 01:04:00 EEST 2008
On Wed, 2008-05-14 at 23:51 +0300, Alexandru Mosoi wrote:
> incerc sa folosesc membrul data pentru a transmite pointerul la
> structura bio astfel:
>
> work_handler:
>
> struct bio* bio =
> (struct bio *)atomic_long_read(&work->data);
>
> printk(KERN_ALERT "handler bio = %p\n", bio);
>
>
> bio_request
>
> printk(KERN_ALERT "request bio = %p\n", bio);
>
> atomic_long_set(&device->work.data, (long)bio);
> PREPARE_WORK(&device->work, ssr_work_handler);
> schedule_work(&device->work);
>
>
> nu stiu ce gresesc, dar cei doi pointeri sunt distincti.
Hmmm ... de unde ai luat exemplele de folosire a work-queue-urilor?
API-ul folosit de tine este invechit. Te-ai uitat pe solutiile
laboratorului 7 [1] (exercitiul 4) pentru un model de folosire a
work-struct-urilor? Sau chiar in laborator[2]?
Razvan
[1] http://cs.pub.ro/~pso/wiki/images/4/41/Lab7-tasks-sol.zip
[2] http://cs.pub.ro/~pso/index.php?section=Laboratoare&file=07.%20Actiuni%20amanabile#Workqueues
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the pso
mailing list