From: Marcel Holtmann <marcel@holtmann.org>
To: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] hci_request
Date: Tue, 26 Apr 2005 13:50:47 +0200 [thread overview]
Message-ID: <1114516247.10706.224.camel@pegasus> (raw)
In-Reply-To: <20050424004443.31751.8@@vodafone.es>
Hi Oliver,
do you really think that reposting the same email makes it more likely
that you get an answer. Please read this first:
http://www.catb.org/~esr/faqs/smart-questions.html
> Well I am trying to understand the full blueZ Stack,
> and i stopped in in hci_core.c the function " __hci_request(...) " line 121
>
> In this portion of code
>
> #####
> DECLARE_WAITQUEUE(wait, current);
> int err = 0;
>
> BT_DBG("%s start", hdev->name);
>
> hdev->req_status = HCI_REQ_PEND;
>
> add_wait_queue(&hdev->req_wait_q, &wait);
> set_current_state(TASK_INTERRUPTIBLE);
>
> req(hdev, opt);
> schedule_timeout(timeout);
>
> remove_wait_queue(&hdev->req_wait_q, &wait);
>
> if (signal_pending(current))
> return -EINTR;
> ######
>
> So:
The book Linux Device Drivers would be a good thing to read first.
> The task who calls the hci_request keeps blocked in add_wait_queue(..) call.
> Which is unblocked by the hci_req_complete() call which is calling when
> processing an event.
Who said that? This is not blocking.
> After unblocking req() call proceeds and awaits at least the timeout
> specified schedule_timeout() ... after that the tast is removed form the
> device queue.
The req() is also not blocking. Only schedule_timeout() is blocking
until hci_req_complete().
> Then what is checking signal_pending(current) call ?
It checks for pending signals.
Regards
Marcel
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
prev parent reply other threads:[~2005-04-26 11:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-23 22:44 [Bluez-devel] hci_request Oliver
2005-04-26 11:50 ` Marcel Holtmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1114516247.10706.224.camel@pegasus \
--to=marcel@holtmann.org \
--cc=bluez-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox