summaryrefslogtreecommitdiff
path: root/libports/manage-one-thread.c
AgeCommit message (Collapse)Author
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