summaryrefslogtreecommitdiff
path: root/lib/libkvm
Commit message (Collapse)AuthorAgeFilesLines
* Make struct swblock kernel only, to make vm/swap_pager.h userland includable.Poul-Henning Kamp2003-01-031-1/+1
| | | | | | | | Move struct swdevt from sys/conf.h to the more appropriate vm/swap_pager.h. Adjust #include use in libkvm and pstat(8) to match. Notes: svn path=/head/; revision=108602
* Teach libkvm to deal with direct mapped addresses.Jake Burkholder2002-12-271-9/+14
| | | | Notes: svn path=/head/; revision=108300
* mdoc(7) police: Deal with self-xrefs.Ruslan Ermilov2002-12-241-1/+1
| | | | Notes: svn path=/head/; revision=108257
* Consistently mark std(in|out|err) with .Dv, because that's how theyRuslan Ermilov2002-12-042-2/+6
| | | | | | | | | | are marked up in stdio(3), and because they are defined expressions of type "FILE *". Approved by: re Notes: svn path=/head/; revision=107619
* Implement working on ELF corefiles. Use kvm_read() when readingMarcel Moolenaar2002-10-211-122/+135
| | | | | | | | | | memory while mapping a virtual address to a physical address. This allows us to work with virtual addresses for page tables, provided it doesn't cause infinite recursion. Currently all page tables are direct mapped. Notes: svn path=/head/; revision=105607
* Adapt to handle the new sparc64 core dump format correctly.Thomas Moestl2002-10-201-32/+95
| | | | | | | Reviewed by: jake Notes: svn path=/head/; revision=105532
* Catch up to SMTX -> SLOCK changes.John Baldwin2002-10-021-7/+7
| | | | Notes: svn path=/head/; revision=104388
* Ressurect libkvm use of the bitmasked signal list in the kernel, now thatJuli Mallett2002-10-011-7/+1
| | | | | | | reliable signal queues are gone. Notes: svn path=/head/; revision=104307
* Fix typo, should zero the kinfo_proc's siglist, not the real one's - the realJuli Mallett2002-10-011-1/+1
| | | | | | | | | | one doesn't have one. Submitted by: jake, scottl Big pointed hat that lands one in the badcommitters box to: jmallett Notes: svn path=/head/; revision=104248
* The list of queued signals is not, can not, and will not be exported to theJuli Mallett2002-09-301-1/+7
| | | | | | | | | userland. If someone wants to implement a backup p_siglist in the kernel for compatability and to export one could. For now, just tell KVM to hand an empty signal set off to the userland. Notes: svn path=/head/; revision=104243
* Fixed messes involving $FreeBSD$ starting with one left in the copyrightBruce Evans2002-09-161-21/+5
| | | | | | | | | | | after adding __FBSDID(). Garbage-collected kvm_readswap(). This was once used by kvm_uread(), but kvm_uread() now just reads /proc/<pid>/mem and procfs hopefully handles swapped out pages. Notes: svn path=/head/; revision=103385
* Allocate KSEs and KSEGRPs separatly and remove them from the proc structure.Julian Elischer2002-09-151-12/+45
| | | | | | | | | | | | next step is to allow > 1 to be allocated per process. This would give multi-processor threads. (when the rest of the infrastructure is in place) While doing this I noticed libkvm and sys/kern/kern_proc.c:fill_kinfo_proc are diverging more than they should.. corrective action needed soon. Notes: svn path=/head/; revision=103367
* In kvm_openfiles/kvm_open, mark the file descriptors as close-on-exec.Jacques Vidrine2002-09-111-0/+12
| | | | | | | | Applications can not do this themselves, as the descriptors are hidden behind the opaque `kvm_t' type. Notes: svn path=/head/; revision=103224
* Completely redo thread states.Julian Elischer2002-09-111-21/+24
| | | | | | | Reviewed by: davidxu@freebsd.org Notes: svn path=/head/; revision=103216
* Hopefully unbreak world. ke_slptime is gone. It should really have beenPeter Wemm2002-08-301-1/+1
| | | | | | | looking at p_ksegrp.kg_slptime anyway. Notes: svn path=/head/; revision=102594
* Allow one to grab the definition of struct ucred by defining _WANT_UCREDAlfred Perlstein2002-08-281-2/+1
| | | | | | | | | | instead of forcing _KERNEL. Move the include of sys/_label.h in ucred.h under the _KERNEL || _WANT_UCRED case. Notes: svn path=/head/; revision=102538
* &x is not a format stringKris Kennaway2002-08-241-1/+1
| | | | Notes: svn path=/head/; revision=102350
* o Merge <machine/ansi.h> and <machine/types.h> into a new headerMike Barcroft2002-08-211-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | called <machine/_types.h>. o <machine/ansi.h> will continue to live so it can define MD clock macros, which are only MD because of gratuitous differences between architectures. o Change all headers to make use of this. This mainly involves changing: #ifdef _BSD_FOO_T_ typedef _BSD_FOO_T_ foo_t; #undef _BSD_FOO_T_ #endif to: #ifndef _FOO_T_DECLARED typedef __foo_t foo_t; #define _FOO_T_DECLARED #endif Concept by: bde Reviewed by: jake, obrien Notes: svn path=/head/; revision=102227
* Hide 'struct ucred' behind '#ifdef _KERNEL', this should stop userlandAlfred Perlstein2002-08-161-0/+3
| | | | | | | | | | from attempting to use it for good. There is a catch, kvm_proc.c needs to '#define _KERNEL' to get at the ucred. Requested by: rwatson Notes: svn path=/head/; revision=101968
* Auto size available kernel virtual address space based on phsyical memoryJake Burkholder2002-08-101-4/+11
| | | | | | | | | | size. This avoids blowing out kva in kmeminit() on large memory machines (4 gigs or more). Reviewed by: tmm Notes: svn path=/head/; revision=101653
* Don't even read in the thread if it is a zombie process.Julian Elischer2002-06-301-7/+10
| | | | Notes: svn path=/head/; revision=99157
* grow a brain and do this right.Julian Elischer2002-06-301-5/+7
| | | | Notes: svn path=/head/; revision=99142
* Don't follow non existant thread pointers (e.g. for zombies)Julian Elischer2002-06-301-33/+35
| | | | Notes: svn path=/head/; revision=99128
* Part 1 of KSE-IIIJulian Elischer2002-06-291-2/+19
| | | | | | | | | | | | | | | | The ability to schedule multiple threads per process (one one cpu) by making ALL system calls optionally asynchronous. to come: ia64 and power-pc patches, patches for gdb, test program (in tools) Reviewed by: Almost everyone who counts (at various times, peter, jhb, matt, alfred, mini, bernd, and a cast of thousands) NOTE: this is still Beta code, and contains lots of debugging stuff. expect slight instability in signals.. Notes: svn path=/head/; revision=99072
* Assume __STDC__, remove non-__STDC__ code.Alfred Perlstein2002-05-281-26/+0
| | | | | | | Submitted by: keramida Notes: svn path=/head/; revision=97407
* Catch up to tte.h changes.Jake Burkholder2002-05-211-2/+2
| | | | Notes: svn path=/head/; revision=97032
* Stub out _kvm_mdopen, we don't the same constants as NetBSDDavid E. O'Brien2002-05-151-0/+2
| | | | Notes: svn path=/head/; revision=96651
* Add a PowerPC machdep for kvm.David E. O'Brien2002-05-151-0/+101
| | | | | | | Obtained from: NetBSD (rev 1.4, pre-UVM) Notes: svn path=/head/; revision=96650
* Fix (for the second time) kvm_getprocs() for the case where noDima Dorfman2002-04-071-0/+26
| | | | | | | | | | | | | | | processes match the given criteria. Since revision 1.60 of malloc.c, malloc() and friends return an invalid pointer when given a size of 0. kvm_getprocs() uses sysctl() with a NULL oldp argument to get an initial size, but does not check whether it's 0 before passing it to realloc() (via _kvm_realloc()). Before the aforementioned malloc() change, this resulted in a minimal allocation made and a valid poitner returned, but now results in an invalid, but non-NULL, pointer being returned. When this is passed to sysctl(), the latter returns EFAULT (as it should). Notes: svn path=/head/; revision=94028
* Remove multi-line __P() usage.David E. O'Brien2002-03-221-3/+4
| | | | Notes: svn path=/head/; revision=92941
* Remove __P() usage.David E. O'Brien2002-03-213-22/+22
| | | | Notes: svn path=/head/; revision=92917
* Remove 'register' keyword.David E. O'Brien2002-03-214-46/+46
| | | | Notes: svn path=/head/; revision=92913
* Also blindly attempt to fix broken world with respect to proc.p_runtimeBrian Feldman2002-02-221-1/+3
| | | | | | | changes. Notes: svn path=/head/; revision=91075
* I THINK this fixes 'make world'Julian Elischer2002-02-131-1/+4
| | | | | | | | | I'll know as soon as I re-import it and compile it.. :-) There is no longer a 'pri' strict in the proc struct. the fields are scattered between the ksegrp and thread in question. Notes: svn path=/head/; revision=90592
* pre-emptively fix a KSE/M3 problem.Julian Elischer2002-02-071-7/+14
| | | | | | | | | | Make a slight change so that libkvm reaches the main thread via the linked list, rather than assuming it is in the proc structure. Both conditions are true in -current but only the first will be true in the KSE M3 world. Notes: svn path=/head/; revision=90360
* Finish cleanup in kvm.c revisions 1.10 and 1.11 -- mark sf (swapfile)Ruslan Ermilov2002-01-222-6/+4
| | | | | | | | | | | | argument to kvm_open() and kvm_openfiles() as unused. BSD didn't read swap since kvm.c CSRG revision 5.21 (u-area is pageable under new VM. no need to read from swap.) The old !NEWVM code was removed in CSRG revision 5.23 (~ten years ago). Notes: svn path=/head/; revision=89640
* Adapt to new kernel tsb structure.Jake Burkholder2001-12-291-16/+9
| | | | Notes: svn path=/head/; revision=88615
* s/processes/files/ inherited from kvm_getprocs(3).Ruslan Ermilov2001-11-241-1/+1
| | | | | | | | PR: docs/32252 Submitted by: tobez Notes: svn path=/head/; revision=86857
* Include sys/param.h instead of sys/types.h to get the definition of theJohn Baldwin2001-11-201-1/+1
| | | | | | | | | MIN() macro. Pointy hat to: rwatson Notes: svn path=/head/; revision=86646
* o Cleanup of includes: user.h may be a catch-all, but that's notRobert Watson2001-11-191-4/+3
| | | | | | | | | | entirely desirable. Back out previous commit, and clean up includes to be more minimal. Submitted by: bde Notes: svn path=/head/; revision=86625
* #include <sys/user.h> rather than individually including a plethoraRobert Watson2001-11-191-4/+1
| | | | | | | | | | of kernel include files, reducing the replication of kernel include dependency information in userland. Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=86606
* libkvm for sparc64. Only works for kernel memory so far.Jake Burkholder2001-11-181-0/+157
| | | | Notes: svn path=/head/; revision=86560
* kern.ps_arg_max_cache is a long, not an int. I believe this is half ofPeter Wemm2001-11-081-1/+1
| | | | | | | | | what broke ps on ia64. It probably also broke on alpha, but the fallback method of using lseek/read on /proc/*/mem to read ps_strings seems to work there. It doesn't on ia64 yet. Notes: svn path=/head/; revision=86179
* Implement va->pa translation for kernel virtual addresses. This isDoug Rabson2001-10-251-30/+59
| | | | | | | untested - it only seems to be used for crashdumps. Notes: svn path=/head/; revision=85478
* Partially port kvm to ia64 - virtual to physical translation is incomplete.Doug Rabson2001-10-231-0/+167
| | | | Notes: svn path=/head/; revision=85361
* Backed out "Compensate for header dethreading [mistakes]" mistakes inBruce Evans2001-10-131-2/+0
| | | | | | | alpha files too. Notes: svn path=/head/; revision=84870
* Compensate for "Compensate for header dethreading" by backing it out.Bruce Evans2001-10-107-14/+0
| | | | Notes: svn path=/head/; revision=84768
* mdoc(7) police: Use the new .In macro for #include statements.Ruslan Ermilov2001-10-018-14/+14
| | | | Notes: svn path=/head/; revision=84306
* Implement __FBSDID()Matthew Dillon2001-09-169-29/+26
| | | | Notes: svn path=/head/; revision=83551
* KSE Milestone 2Julian Elischer2001-09-121-15/+16
| | | | | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha Notes: svn path=/head/; revision=83366