From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 1/5] Refactor the command parsing framework
Date: Thu, 25 Mar 2010 20:10:28 -0500 [thread overview]
Message-ID: <201003252010.28985.denkenz@gmail.com> (raw)
In-Reply-To: <33AB447FBD802F4E932063B962385B351D67BF96@shsmsx501.ccr.corp.intel.com>
[-- Attachment #1: Type: text/plain, Size: 1109 bytes --]
Hi Zhenhua
> > Err, OK stop right there. This is really way too complicated.
> > How about we simply set a flag before calling
> > at_command_notify. If after executing it send_final or
> > send_ext_final response has been sent, then we continue
> > processing, otherwise we restart when send_ext_final or
> > send_final will be called again. You really don't need to touch this
> > function at all.
>
> OK. So the problem is if the at_command_notify is blocked by user callback,
> the mainloop won't have chance to read data in from non-blocking I/O I
> guess. That's the reason I added this. If we don't need to handle such
> case, then the logic could be much simplier. We could discuss it on IRC.
So what you want to assume here is that for long running operations the
callback with schedule its own g_sources and will eventually call send_final.
This works because the server can only have one outstanding command at a time.
You don't need to worry about blocking semantics here (they just work) and we
won't consider re-entrant event loops for now.
Regards,
-Denis
prev parent reply other threads:[~2010-03-26 1:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-25 13:48 [PATCH 0/5] Prototype to handle asynchronized callback Zhenhua Zhang
2010-03-25 13:48 ` [PATCH 1/5] Refactor the command parsing framework Zhenhua Zhang
2010-03-25 13:48 ` [PATCH 2/5] Add server send final result code Zhenhua Zhang
2010-03-25 13:48 ` [PATCH 3/5] Add set server to offline mode during parse line Zhenhua Zhang
2010-03-25 13:48 ` [PATCH 4/5] Add register S3-S5 basic command callbacks Zhenhua Zhang
2010-03-25 13:48 ` [PATCH 5/5] Add register ATE and other " Zhenhua Zhang
2010-03-25 17:24 ` [PATCH 1/5] Refactor the command parsing framework Denis Kenzior
2010-03-25 23:37 ` Zhang, Zhenhua
2010-03-26 1:10 ` Denis Kenzior [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=201003252010.28985.denkenz@gmail.com \
--to=denkenz@gmail.com \
--cc=ofono@ofono.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.