aboutsummaryrefslogtreecommitdiff
path: root/libps/proclist.c
Commit message (Collapse)AuthorAgeFilesLines
* Style tweaksSergey Bugaev2023-05-101-1/+1
| | | | Message-Id: <20230508213136.608575-42-bugaevc@gmail.com>
* libps: Port to x86_64Sergey Bugaev2023-05-101-9/+12
| | | | Message-Id: <20230508213136.608575-12-bugaevc@gmail.com>
* Further modernize Hurd code by enforcing strict prototypes and no implicit ↵Flavio Cruz2023-04-081-4/+2
| | | | | | | | | | | | | | | | | | function declarations. Most of the changes land in one of these buckets: * Removed unused declarations. * Used (void) to represent no parameters instead of () which means an undeterminate number of parameters. * Included missing header files whenever necessary (stdlib.h, sys/mman.h, etc) * Typedefed function pointers to be able to fully declare the parameter types. * Added declarations of library functions that are used elsewhere (example is libps/ps.h). * Made functions static whenever they are only used in that file. * Forwarded declarations of some methods that were made static. Message-Id: <ZDD1o7/tVYeZew+G@jupiter.tail36e24.ts.net>
* libps: fix some signed vs unsigned comparisionEtienne Brateau2022-01-201-1/+1
| | | | Message-Id: <20220119192945.36654-5-etienne.brateau@gmail.com>
* Replace bcopy with memcpy or memmove as appropriate.Justus Winter2017-08-051-1/+1
| | | | | | | | | | | * boot/boot.c: Replace bcopy with memcpy or memmove as appropriate. * exec/hashexec.c: Likewise. * libps/proclist.c: Likewise, but also fix the amount of data copied. * libps/procstat.c: Likewise. * libps/spec.c: Likewise. * libshouldbeinlibc/cacheq.c: Likewise. * libshouldbeinlibc/idvec.c: Likewise. * libshouldbeinlibc/timefmt.c: Likewise.
* Simplify deallocations.Justus Winter2017-08-051-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | free (NULL) is a nop, therefore it is not necessary to check that first. Simplify the code accordingly. This commit is the result of the following semantic patch: @@ identifier X; @@ -if (X) free (X); +free (X); * console-client/console.c: Simplify accordingly. * console-client/driver.c: Likewise. * console-client/vga.c: Likewise. * ftpfs/dir.c: Likewise. * libftpconn/unix.c: Likewise. * libps/fmt.c: Likewise. * libps/proclist.c: Likewise. * libstore/mvol.c: Likewise. * nfs/ops.c: Likewise. * proc/host.c: Likewise. * sutils/fstab.c: Likewise.
* Use our own variant of 'assert' and 'assert_perror'.Justus Winter2017-08-051-1/+1
| | | | | Our variants print stack traces on failures. This will make locating errors much easier.
* 2002-05-07 Roland McGrath <roland@frob.com>Roland McGrath2002-05-081-12/+15
| | | | | | | | | * context.c (ps_context_find_tty_by_cttyid): int -> mach_port_t * proclist.c (proc_stat_list_add_all): unsigned -> size_t (proc_stat_list_add_login_coll): Likewise. (proc_stat_list_add_session): Likewise. (proc_stat_list_add_fn_pids): Likewise. (proc_stat_list_add_id_fn_pids): Likewise.
* (proc_stat_list_clone): New function.Miles Bader1996-06-271-4/+28
|
* Add some const decls.Miles Bader1996-05-071-3/+3
|
* Get rid of mega typedefs, and just use structure pointers like other hurdMiles Bader1996-03-261-128/+134
| | | | libraries. Other misc cleanups.
* (proc_stat_list_add_pids): Add and support new return parameter PROC_STATS.Miles Bader1996-02-151-41/+85
| | | | | | | | (proc_stat_list_add_pid): Add and support new return parameter PS. (proc_stat_list_add_fn_pids, proc_stat_list_add_id_fn_pids, proc_stat_list_add_all, proc_stat_list_add_login_coll, proc_stat_list_add_session, proc_stat_list_add_pgrp): Add and support new return parameters PROC_STATS & NUM_PROCS.
* (proc_stat_list_fmt): Use new write function names.Miles Bader1995-11-201-18/+8
| | | | Use new STREAM parameter instead of old one and count.
* (proc_stat_list_for_each): New function for iterating over proc_stat_lists.Miles Bader1995-05-031-0/+47
| | | | | (proc_stat_list_spec_nominal): New function for deciding if a particular spec is always nominal.
* (proc_stat_list_sort1): Always keep threads after their process when sorting!Miles Bader1995-04-071-54/+70
| | | | | | | Factor out most of proc_stat_list_add_all, proc_stat_list_add_login_coll, and proc_stat_list_add_session into proc_stat_list_add_[id_]fn_pids. (proc_stat_list_add_pgrp): New function, adds pids for a pgrp. Tighten up types used (i.e., don't use int for everything).
* A proc_stat_list_t points to a ps_context_t now instead of directly to the procMiles Bader1995-03-141-28/+32
| | | | | | | server (but we can get the proc server from the context). We no longer create or free proc_stat_ts; we leave that up to our ps_context, except in the case of thread proc_stats. Add the inverse of proc_stat_list_add_threads, proc_stat_list_remove_threads.
* Initial revisionMiles Bader1995-03-131-0/+561