[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 20/53: libpager: improve the pager_demuxer function
From: |
Samuel Thibault |
Subject: |
[hurd] 20/53: libpager: improve the pager_demuxer function |
Date: |
Thu, 20 Mar 2014 02:23:50 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 6d38ec6d31e295b60bd5c84cc89229484afed56a
Author: Justus Winter <address@hidden>
Date: Mon Feb 24 12:23:05 2014 +0100
libpager: improve the pager_demuxer function
Handle multiple request types as recommended by the Mach Server
Writer's Guide section 4, subsection "Handling Multiple Request
Types". This avoids initializing the reply message in every X_server
function. The reply message has already been properly initialized in
libports, so there is no need to call mig_reply_setup.
* libpager/demuxer.c (pager_demuxer): Improve the demuxer function.
---
libpager/demuxer.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/libpager/demuxer.c b/libpager/demuxer.c
index 79c0ddc..b4d4054 100644
--- a/libpager/demuxer.c
+++ b/libpager/demuxer.c
@@ -25,16 +25,16 @@ int
pager_demuxer (mach_msg_header_t *inp,
mach_msg_header_t *outp)
{
- extern int _pager_seqnos_memory_object_server (mach_msg_header_t *inp,
- mach_msg_header_t *outp);
- extern int _pager_seqnos_notify_server (mach_msg_header_t *inp,
- mach_msg_header_t *outp);
+ mig_routine_t routine;
+ if ((routine = _pager_seqnos_memory_object_server_routine (inp)) ||
+ (routine = _pager_seqnos_notify_server_routine (inp)))
+ {
+ (*routine) (inp, outp);
+ return TRUE;
+ }
- int result = _pager_seqnos_memory_object_server (inp, outp)
- || _pager_seqnos_notify_server (inp, outp);
- if (!result)
- /* Synchronize our bookkeeping of the port's seqno with the one consumed by
- this bogus message. */
- _pager_update_seqno (inp->msgh_local_port, inp->msgh_seqno);
- return result;
+ /* Synchronize our bookkeeping of the port's seqno with the one
+ consumed by this bogus message. */
+ _pager_update_seqno (inp->msgh_local_port, inp->msgh_seqno);
+ return FALSE;
}
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 03/53: Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurd, (continued)
- [hurd] 03/53: Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurd, Samuel Thibault, 2014/03/19
- [hurd] 39/53: auth: improve the mig mutator functions, Samuel Thibault, 2014/03/19
- [hurd] 01/53: trans/fakeroot: fix cached node retrieval on lookup, Samuel Thibault, 2014/03/19
- [hurd] 10/53: Add missing copyright notice, Samuel Thibault, 2014/03/19
- [hurd] 06/53: Fix typos, Samuel Thibault, 2014/03/19
- [hurd] 19/53: utils/umount: do not remove passive translator records, Samuel Thibault, 2014/03/19
- [hurd] 16/53: pfinet: set a non-zero ports management timeout, Samuel Thibault, 2014/03/19
- [hurd] 14/53: libstore: fixed some pointer-sign related warnings, Samuel Thibault, 2014/03/19
- [hurd] 22/53: mach-defpager: add function mig_reply_setup, Samuel Thibault, 2014/03/19
- [hurd] 17/53: exec: provide a meaningful name for new tasks, Samuel Thibault, 2014/03/19
- [hurd] 20/53: libpager: improve the pager_demuxer function,
Samuel Thibault <=
- [hurd] 21/53: mach-defpager: fix definition of seqnos_memory_object_data_unlock, Samuel Thibault, 2014/03/19
- [hurd] 23/53: mach-defpager: improve the default_pager_demux_object function, Samuel Thibault, 2014/03/19
- [hurd] 18/53: Fix fakeroot and remap parsing corner cases, Samuel Thibault, 2014/03/19
- [hurd] 15/53: libports: work around bugs in server termination, Samuel Thibault, 2014/03/19
- [hurd] 27/53: tmpfs: set diskfs_disk_name to "none", Samuel Thibault, 2014/03/19
- [hurd] 25/53: nfs: implement netfs_get_source, Samuel Thibault, 2014/03/19
- [hurd] 26/53: trans/mtab: ignore translators that do not implement file_get_source, Samuel Thibault, 2014/03/19
- [hurd] 08/53: Add --font-width option to force 8/9 pixel font width, Samuel Thibault, 2014/03/19
- [hurd] 36/53: term: fix receiver lookups in the tioctl server functions, Samuel Thibault, 2014/03/19
- [hurd] 29/53: New RPCs, fix build, Samuel Thibault, 2014/03/19