aboutsummaryrefslogtreecommitdiff
path: root/libports/manage-one-thread.c
Commit message (Collapse)AuthorAgeFilesLines
* Use designated initializers when building mach_msg_type_tFlavio Cruz2023-05-041-8/+8
| | | | Message-Id: <ZFLcIs0iwiC9kQDf@jupiter.tail36e24.ts.net>
* Drop the register qualifier.Justus Winter2017-08-231-1/+1
| | | | | | | | | * console/display.c: Drop 'register'. * eth-multiplexer/dev_stat.c: Likewise. * libbpf/bpf_impl.c: Likewise. * libbpf/queue.c: Likewise. * libports/manage-multithread.c: Likewise. * libports/manage-one-thread.c: Likewise.
* libports: preserve the complex message flagJustus Winter2016-02-231-3/+4
| | | | | | | * 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.
* libports: clarify why we emulate protected payloadsJustus Winter2015-08-141-0/+5
| | | | | | | | | | | | | | | | 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.
* libports: use protected payloads to optimize the object lookupJustus Winter2015-04-071-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | * 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'.
* libports: work around bugs in server terminationJustus Winter2014-04-291-1/+8
| | | | | | | | | | | | | | 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.
* fix common misspellingsJonathan Neuschäfer2011-08-201-1/+1
| | | | | | * Fix spelling with codespell[1] and manually review it. [1] http://git.profusion.mobi/cgit.cgi/lucas/codespell/
* (ports_manage_port_operations_one_thread): Fill in meaningfulMichael I. Bushnell1996-03-281-2/+6
| | | | statuses and errors rather than just zero.
* (ports_manage_port_operations_one_thread): Fill in default replyMichael I. Bushnell1996-03-281-2/+23
| | | | | | 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.
* (ports_manage_port_operations_one_thread):Miles Bader1996-01-271-5/+3
| | | | Pass INP->msgh_id to ports_begin_rpc, and only call DEMUXER if it returns 0.
* (ports_manage_port_operations_one_thread): Doc fix.Michael I. Bushnell1995-11-211-0/+3
|
* (ports_manage_port_operations_one_thread/internal_demuxer): Don'tMichael I. Bushnell1995-10-241-10/+14
| | | | attempt RPC if we can't get a valid port struct.
* Initial revisionMichael I. Bushnell1995-06-201-0/+63