summaryrefslogtreecommitdiff
path: root/libports/manage-one-thread.c
AgeCommit message (Collapse)Author
2016-02-23libports: preserve the complex message flagJustus Winter
* libports/manage-multithread.c (internal_demuxer): Preserve all message flags when we store the objects address as payload in the message. * libports/manage-one-thread.c (internal_demuxer): Likewise.
2015-08-14libports: clarify why we emulate protected payloadsJustus Winter
The Hurd uses protected payloads to improve the receiver lookup on the server side to the point that we no longer do a hash table lookup in the dispatch code. If the kernel does not support protected payloads, we degrade gracefully, do one lookup in libports' dispatching code, and emulate the protected payload feature to still save one hash table lookup in the intrans function. * libports/manage-multithread.c (ports_manage_port_operations_multithread): Add comment. * libports/manage-one-thread.c (ports_manage_port_operations_one_thread): Likewise.
2015-04-07libports: use protected payloads to optimize the object lookupJustus Winter
* NEWS: Mention protected payloads. * libports/Makefile (SRCS): Add `port-deref-deferred.c'. * libports/create-internal.c (_ports_create_port_internal): Set the protected payload to the objects address. * libports/import-port.c (ports_import_port): Likewise. * libports/reallocate-from-external.c (ports_reallocate_from_external): Likewise. * libports/reallocate-port.c (ports_reallocate_port): Likewise. * libports/transfer-right.c (ports_transfer_right): Likewise. * libports/manage-multithread.c (ports_manage_port_operations_multithread): Use the protected payload for the object lookup if provided. Add thread pool management calls. * libports/manage-one-thread.c (ports_manage_port_operations_one_thread): Likewise. * libports/destroy-right.c (ports_destroy_right): Defer the dereferencing of outstanding send rights to avoid a port_info use-after-free. * libports/port-deref-deferred.c: New file. * libports/port-deref-deferred.h: Likewise. * libports/ports.h (struct port_bucket): New field `threadpool'. (ports_lookup_payload): Check `port_right'.
2014-04-29libports: work around bugs in server terminationJustus Winter
Some servers use ports_manage_port_operations_one_thread to process requests and terminate when it returns. Since many of them don't detach before shutting down, a client may receive an error if its request arrived while the server is shutting down. Prevent those spurious errors by forcing ports_manage_port_operations_one_thread not to return. This is the same change as 235491231bdd1fd93507c835767503f047e10b91 introduced for ports_manage_port_operations_multithread. * libports/manage-one-thread.c (ports_manage_port_operations_one_thread): Force timeout to 0.
2011-08-20fix common misspellingsJonathan Neuschäfer
* Fix spelling with codespell[1] and manually review it. [1] http://git.profusion.mobi/cgit.cgi/lucas/codespell/
1996-03-28(ports_manage_port_operations_one_thread): Fill in meaningfulMichael I. Bushnell
statuses and errors rather than just zero.
1996-03-28(ports_manage_port_operations_one_thread): Fill in default replyMichael I. Bushnell
before doing work; we might return 0 and mach_msg_server expects us to fill in a reply decently no matter what. (ports_manage_port_operations_multithread): Likewise.
1996-01-27(ports_manage_port_operations_one_thread):Miles Bader
Pass INP->msgh_id to ports_begin_rpc, and only call DEMUXER if it returns 0.
1995-11-21(ports_manage_port_operations_one_thread): Doc fix.Michael I. Bushnell
1995-10-24(ports_manage_port_operations_one_thread/internal_demuxer): Don'tMichael I. Bushnell
attempt RPC if we can't get a valid port struct.
1995-06-20Initial revisionMichael I. Bushnell