summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-11-24Remove condition implicationsRichard Braun
There is no equivalent for these functions in libpthread. Instead of adding them as non standard extensions, rework their use. * console-client/kbd-repeat.c (kbd_repeat_key): Wake threads waiting on select_alert. (kbd_setrepeater): Remove call to condition_implies. console-client/pc-mouse.c (repeat_event): Wake threads waiting on select_alert. (setrepeater): Remove call to condition_implies. * libpipe/pipe.c (pipe_create): Initialize the `pending_selects' member. (pipe_add_select_cond): New function. (pipe_remove_select_cond): Likewise. (pipe_select_cond_broadcast): Likewise. (_pipe_no_readers): Wake threads waiting on a pending select. (_pipe_no_writers): Likewise. (pipe_send): Likewise. (pipe_recv): Likewise. (pipe_pair_select): Replace condition implications by installing a pending select on the pair of pipes. * libpipe/pipe.h (struct pipe_select_cond): New type. (struct pipe): New member `pending_selects'. * pfinet/tunnel.c (tunnel_xmit): Wake threads waiting on tdev->select_alert. (setup_tunnel_device): Remove call to condition_implies. * term/devio.c (device_write_reply_inband): Wake threads waiting on select_alert. * term/hurdio.c (hurdio_writer_loop): Likewise. * term/main.c (main): Remove calls to condition_implies. * term/ptyio.c (ptyio_init): Remove calls to condition_implies, initialize pty_select_alert. (wake_reader): Wake threads waiting on pty_select_wakeup. * term/term.h (pty_select_alert): New variable. (clear_queue): Wake threads waiting on select_alert and, if acting on the input queue, pty_select_alert, unless it's NULL. (dequeue_quote): Likewise. (enqueue_internal): Likewise. (queue_erase): Likewise. * trans/streamio.c (clear_buffer): Wake threads waiting on select_alert. (buffer_read): Likewise. (buffer_write): Likewise. (device_read_reply_inband): Likewise. (device_write_reply_inband): Likewise. (main): Remove calls to condition_implies.
2012-11-24Move starvation-reduction computation into adjust_priorityRichard Braun
* libports/manage-multithread.c (ports_manage_port_operations_multithread): Move starvation-reduction computation and thread_switch() call into... (adjust_priority): ... here, passing TOTALTHREADS as a parameter.
2012-11-24Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurdSamuel Thibault
2012-11-24Reduce contention on thread creation in libportsRichard Braun
* libports/manage-multithread.c (ports_manage_port_operations_multithread): Don't drop the lock when determining if a new thread must be created.
2012-10-22libps: Fix typo in the documentation of _proc_stat_create.Cyril Roelandt
* libps/ps.h: Refer to ps_context_find_proc_stat instead of pc_context_find_proc_stat.
2012-10-04Revert "libdiskfs: handle _PC_2_SYMLINKS in pathconf"Pino Toscano
It turned out it is the wrong approach. This reverts commit b6768b326c2e80f5c2326ab46459644d417c6e98.
2012-09-30tmpfs: add --sizePino Toscano
Add the possibility to specify the size with the --size parameter; this makes tmpfs more usable in fstab or Linuxish mount invocations, since the size in such cases is a mount -o option, which gets translated to a --foo translator argument. The old way (specifying the size as the first argument) is left there; although, if --size is passed then the first argument must be "tmpfs", as it is what is passed by fstab/mount. * tmpfs/tmpfs.c (OPT_SIZE): New macro. (options): Add the "size" option. (parse_opt): Use -1 to indicate when SIZE is not yet set. <OPT_SIZE>: Handle case. <ARGP_KEY_NO_ARGS>: Error out only when SIZE is not set. <ARGP_KEY_ARGS>: Error out when SIZE is set and the argument is not "tmpfs".
2012-09-30tmpfs: extract size string parsing in an own functionPino Toscano
* tmpfs/tmpfs.c (parse_opt_size): New function, broken out of ... (parse_opt): ... here. Call it.
2012-09-30libdiskfs: handle _PC_2_SYMLINKS in pathconfPino Toscano
Advertize the possibility to handle symlinks depending on DISKFS_SHORTCUT_SYMLINK. * libdiskfs/io-pathconf.c (diskfs_S_io_pathconf): Handle _PC_2_SYMLINKS too.
2012-09-23Add more keymapsSamuel Thibault
* console-client/xkb/xkb-data/keymap/hurd: Add keymaps used by the Debian installer.
2012-09-23Automatically setup local sockets if not already done so.Samuel Thibault
Needed early for shell pipelines. * daemons/runsystem.sh: See whether pflocal is setup already, and do so if not (install case)
2012-09-23Add options for user-space parted storesJeremie Koenig
Add option -p to MAKEDEV to use user-space parted stores for partition devices. * sutils/MAKEDEV.sh: Add -p option to use "part" store type.
2012-09-23Add options -k and -K to MAKEDEV.shJeremie Koenig
to chose not to overwrite existing entries. * MAKEDEV.sh: Handle -k by passing it to settrans. Handle -K by checking for existing translator.
2012-09-23Reduce starvation among libports threadsRichard Braun
* libports/manage-multithread.c: Include <mach/thread_info.h> and <mach/thread_switch.h> (THREAD_PRI): New macro. (adjust_priority): New function. (ports_manage_port_operations_multithread): Set higher priority to privileged translators's threads. Reduce priority of newly-created threads, to give originators a chance to finish what they were doing.
2012-09-23Fix pager deadlockSamuel Thibault
http://lists.gnu.org/archive/html/bug-hurd/2010-03/msg00127.html * libpager/lock-object.c (_pager_lock_object): Release interlock before calling memory_object_lock_request, to let the callbacks take it.
2012-09-22Check that runsystem script exists before trying it.Samuel Thibault
* init/init.c (launch_something): Check with file_name_lookup that runsystem script exists before calling start_child. * daemons/console-run.c (main): Check with file_name_lookup that runsystem script exists before opening a console for it.
2012-09-22Set diskfs stores as readonly on shutdown before enabling RPCs again.Samuel Thibault
* libdiskfs/init-startup.c (diskfs_S_startup_dosync): Set diskfs as read-only on shutdown.
2012-09-22Fix spurious destroy during RPC to self with rendez-vousSamuel Thibault
In that case we have two receive right references, which we should consume one per one, instead of destroying them all at once (and thus fail on second destroy) http://lists.gnu.org/archive/html/bug-hurd/2011-03/msg00045.html * libfshelp/fetch-root.c (fshelp_fetch_root): Unreference rendez-vous port receive right instead of destroying the port. * libshouldbeinlibc/exec-reauth.c (exec_reauth): Likewise.
2012-09-22Install .msgids files to datadir.Alfred M. Szmidt
* Makefile (MSGIDS): New variable. (all, install-msgids, $(datadir)/msgids): New targets. (install): Specify install-header and install-msgids as prerequisites.
2012-09-22Avoid waiting for disk I/O completionSamuel Thibault
This improves performance quite a bit, and is not less safe. * ext2fs/dir.c (diskfs_direnter_hard, diskfs_dirremove_hard, diskfs_dirrewrite_hard): Pass diskfs_synchronous instead of 1 as wait parameter to diskfs_file_update. * ext2fs/truncate.c (diskfs_truncate): Likewise. * libdiskfs/dir-init.c (diskfs_init_dir): Likewise. * libdiskfs/dir-link.c (diskfs_S_dir_link): Likewise. * libdiskfs/dir-rename.c (diskfs_S_dir_rename): Likewise. * libdiskfs/dir-renamed.c (diskfs_rename_dir): Likewise. * libdiskfs/file-set-trans.c (diskfs_S_file_set_translator): Likewise. * libdiskfs/node-create.c (diskfs_create_node): Likewise. * libdiskfs/node-drop.c (diskfs_drop_node): Likewise.
2012-08-02Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurdSamuel Thibault
2012-08-02Use ext2fs instead of ufs in hurd.bootSamuel Thibault
* hurd.boot: Use /hurd/ext2fs instead of /hurd/ufs.
2012-07-26pflocal: Handle non-blocking connect with no pending acceptors.Neal H. Walfield
* pflocal/connq.h (struct connq_request): Remove forward. (connq_listen): Wait for a request to be queued not until there is a connection attempt. Remove REQ parameter. Update callers. (connq_request_complete): Remove declaration. (connq_connect): Wait for a slot to queue a request not until there is an acceptor. Remove SOCK parameter. Update callers. (connq_connect_complete): New declaration. (connq_connect_cancel): New declaration. * pflocal/connq.c (struct connq): Remove fields noqueue, queue, length, head and tail. Add fields head, tail, count, max, connectors and num_connectors. That is, replace the circular buffer with a singly linked list. (qnext): Remove function. (struct connq_request): Remove field signal, lock, completed and err. Add field next. (connq_request_init): Rewrite according to new semantics. (connq_request_enqueue): New function. (connq_request_dequeue): New function. (connq_create): Update according to new semantics. (connq_destroy): Likewise. (connq_listen): Rewrite to not block until there is a connector but until there is a request in the queue. (connq_request_complete): Remove function. (connq_connect): Rewrite to not block until there is an acceptor but until there is space for a request. (connq_connect_complete): New function. (connq_connect_cancel): New function. (connq_compress): Remove dead code. (connq_set_length): Rewrite. * pflocal/socket.c (S_socket_connect): Create the server socket here... (S_socket_accept): ... not here.
2012-07-10Fix default XKB_BASE directorySamuel Thibault
* configure.in (XKB_BASE): Default to $datadir/share/X11/xkb.
2012-07-10Fix out-of-tree buildSamuel Thibault
* console-client/Makefile (xkb/kstoucs_map.c): Make xkb directory in build tree. (CPPFLAGS): Add -I$(CURDIR)/xkb
2012-07-08Always enable stack red zoneSamuel Thibault
* libthreads/stack.c (setup_stack): Always enable disabling access to end of stack. Add support for stacks growing up.
2012-07-03Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurdSamuel Thibault
2012-07-03Fix stack corruption in ext2fs serverRichard Braun
* ext2fs/inode.c (diskfs_node_iterate): allocate the temporary node table from the heap instead of the stack.
2012-07-02Check for rendezvous port death in auth serverCarl Fredrik Hammar
* auth/auth.c (S_auth_user_authenticate, S_auth_server_authenticate): Return EINVAL if rendezvous port dies during transaction.
2012-07-01Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurdSamuel Thibault
2012-07-01Use path to x11 locales from x11.pc instead of our prefixSamuel Thibault
* configure.in (X11_PREFIX): Define from x11.pc's prefix variable. * console-client/xkb/compose.c (get_compile_file_for_locale): Use X11_PREFIX "/share" instead of DATADIR.
2012-07-01Check for null ports in auth serverCarl Fredrik Hammar
* auth/auth.c (S_auth_user_authenticate, S_auth_server_authenticate): Fail with EINVAL if RENDEZVOUS is MACH_PORT_NULL.
2012-07-01TODO: make xkb use rulesSamuel Thibault
2012-07-01Import pkg.m4Samuel Thibault
2012-07-01Fix kstoucs generation dependencySamuel Thibault
* console-client/Makefile: Make kstoucs.o and kstoucs_pic.o depend on kstoucs_map.c, not kstoucs_map.c
2012-07-01Merge branch 'master' into xkbSamuel Thibault
Conflicts: console-client/Makefile
2012-07-01Rework rpctrace into handling multitask programsDa Zheng
* rpctrace.c (UNKNOWN_NAME): New variable. (task_info): New structure. (traced_task): Removed. (task_ihash): New variable. (unknown_task): Likewise. (add_task): New function. (remove_task): Likewise. (traced_info): Modified. (receiver_info): New structure. (sender_info): Likewise. (send_once_info): Likewise. (TRACED_INFO): New macro. (SEND_INFO): Likewise. (SEND_ONCE_INFO): Likewise. (req_info): New structure. (req_head): New variable. (add_request): New function. (remove_request): Likewise. (freelist): Different type. (notify_pi): New variable. (receive_right_list): Likewise. (dummy_wrapper): Likewise. (traced_names): Different initial value. (other_class): New variable. (print_request_header): Different parameter. (print_reply_header): Likewise. (new_receiver_info): New function. (destroy_receiver_info): Likewise. (new_send_wrapper): Redefined. (new_send_once_wrapper): Modified. (unlink_sender_info): New function. (traced_dropweak): Removed. (traced_clean): New function. (seen_receive_right): Likewise. (discover_receive_right): Likewise. (get_send_wrapper): Likewise. (rewrite_right): Redefined. (print_contents): Don't treat mach_port_insert_right specially. (wrap_all_threads): Use new structuress. (wrap_new_thread): Likewise. (wrap_new_task): New function. (trace_and_forward): Redefined. (expected_reply_port): Removed. (print_request_header): Use new structures. (print_reply_header): Likewise. (unfinished_line): Removed. (traced_spawn): Use new structures. (main): Initialize some global variables.
2012-07-01Make rpctrace handle terminate/suspend signals correctlyDa Zheng
Fixes bug #3939 * rpctrace.c (traced_task): Relocate. (wrap_all_threads): New function. (wrap_new_thread): Likewise. (trace_and_forward): Wrap all thread ports.
2012-06-30Address gcc warningsBob Ham
* exec-reauth.c (exec_reauth): Change type of temp var i to unsigned int to address gcc warning. * idvec-impgids.c (idvec_merge_implied_gids) Change type of temp var i to unsigned int to address gcc warning. * idvec-impgids.c (idvec_merge_implied_gids): Change type of temp var i to unsigned int to address gcc warning. * idvec-rep.c (idvec_rep): Change type of temp var i to unsigned int to address gcc warning. * idvec-verify (idvec_verify): Change type of temp var i to unsigned int to address gcc warning. * idvec.c (idvec_merge_ids, idvec_remove): Change type of temp var i to unsigned int to address gcc warning. * portxlate.c (port_name_xlator_create, port_name_xlator_free): Change type of temp var i to unsigned int to address gcc warning. * timefmt.c (fmt_seconds): Cast width to int in test to modify frac_places to address gcc warning. * (ugids_verify_make_auth): Change type of temp var i to unsigned int to address gcc warning.
2012-06-30Address gcc warningsBob Ham
* iouser-restrict.c (listmember): Change type of query into uid_t to address gcc warning. (iohelp_restrict_iouser): Change type of temp var i to unsigned int to address gcc warning.
2012-07-01Merge branch 'master' into xkbSamuel Thibault
Conflicts: config.make.in configure.in
2012-06-30Address gcc warningBob Ham
* ihash.c (ihash_add): Change type of i to unsigned int to address gcc warning.
2012-06-05Fix operation prioritySamuel Thibault
* balloc.c (ext2_new_block): Fix operation priority.
2012-06-05Add header inclusion guardsSamuel Thibault
* console/priv.h [!_CONSOLE_PRIV_H]: Define _CONSOLE_PRIV_H. * libnetfs/priv.h [!_LIBNETFS_PRIV_H]: Define _LIBNETFS_PRIV_H. * libpager/priv.h [!_LIBPAGER_PRIV_H]: Define _LIBPAGER_PRIV_H.
2012-05-23Fix bit shift validitySamuel Thibault
* ext2fs/balloc.c (ext2_new_block): When J & 31 is 31, replace 32bit right shift with 0;
2012-05-23Fix find_next_zero_bit when no bit is availableSamuel Thibault
* ext2fs/bitmap.c (find_next_zero_bit): Check whether TMP has a bit set before calling ffz.
2012-05-19Add /dev/netdde and /dev/eth* targetsSamuel Thibault
* sutils/MAKEDEV.sh (netdde, eth*): Add targets.
2012-05-13Fix link(directory,whatever) POSIX compliancySamuel Thibault
* libdiskfs/dir-link.c (diskfs_S_dir_link): When source node is a directory, fail with EPERM instead of EISDIR.
2012-04-27Add MSG_PEEK support to pflocalSamuel Thibault
* libpipe/pq.h (packet_peek): Declare new function. * libpipe/pq.c (packet_read): Move code to new `packet_fetch' function, call it with `remove' set to 1. (packet_fetch): New function with code from `packet_read', but do not remove data if `remove' is 0. (packet_peek): New function, calls `packet_fetch' with `remove' set to 0. * libpipe/dgram.c (dgram_read): When MSG_PEEK is in *flags, do not dequeue and only peek data. * libpipe/seqpack.c (seqpack_read): Likewise. * libpipe/stream.c (stream_read): Likewise. * pflocal/socket.c (S_socket_recv): Pass MSG_PEEK flag to libpipe.
2012-04-10dist: Remove redundant "./" for top-level $(DISTFILES)Ludovic Courtès
* Makeconf (dist.tar): When $(dir) is ".", avoid adding "./" to the resulting file name.