summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* - Mark the various thr syscalls as MP safe. Previously there was a bug ifjeff2003-04-011-4/+4
| | | | this was not done since thr_exit() unwinds giant.
* - Borrow the KSE single threading code for exec and exit. We use the checkjeff2003-04-016-10/+25
| | | | | | | | if (p->p_numthreads > 1) and not a flag because action is only necessary if there are other threads. The rest of the system has no need to identify thr threaded processes. - In kern_thread.c use thr_exit1() instead of thread_exit() if P_THREADED is not set.
* - Regen for umtx.jeff2003-04-015-7/+23
|
* - Add thr and umtx system calls.jeff2003-04-013-0/+24
|
* - Add the kern_umtx.c file to the build.jeff2003-04-011-0/+1
|
* - Include umtx.h in files generated by makesyscalls.shjeff2003-04-012-0/+3
| | | | - Add system calls for umtx.
* - Add an entry and a head for the queue of threads blocked on a umtx.jeff2003-04-011-0/+4
| | | | - Add a prototype for thr_exit1().
* - Add an api for doing smp safe locks in userland.jeff2003-04-012-0/+390
| | | | | | | | | | | | - umtx_lock() is defined as an inline in umtx.h. It tries to do an uncontested acquire of a lock which falls back to the _umtx_lock() system-call if that fails. - umtx_unlock() is also an inline which falls back to _umtx_unlock() if the uncontested unlock fails. - Locks are keyed off of the thr_id_t of the currently running thread which is currently just the pointer to the 'struct thread' in kernel. - _umtx_lock() uses the proc pointer to synchronize access to blocked thread queues which are stored in the first blocked thread.
* - We now have to include umtx.h and ucontext.h in the system call relatedjeff2003-04-011-0/+2
| | | | headers.
* - Regen for thr related system calls.jeff2003-04-015-7/+46
|
* - Add the four thr related system calls.jeff2003-04-011-0/+4
|
* - Add kern_thr.cjeff2003-04-011-0/+1
|
* - Add two files to support the thr threading interface.jeff2003-04-012-0/+311
| | | | | | - sys/thr.h contains the user space visible api that is intended only for use in threading library packages. - kern/kern_thr.c contains thr system calls and other thr specific code.
* - Define a new md function 'casuptr'. This atomically compares and setsjeff2003-04-0111-0/+146
| | | | | | | | | | a pointer that is in user space. It will be used as the basic primitive for a kernel supported user space lock implementation. - Implement this function in x86's support.s - Provide stubs that return -1 in all other architectures. Implementations will follow along shortly. Reviewed by: jake
* - In npxgetregs() use the td argument to save the fpu state from and notjeff2003-04-013-6/+3
| | | | | | | curthread. Nothing currently depends on this behavior. - Clean up an extra newline. Obtained from: bde
* - Add a placeholder for sigwaitjeff2003-03-313-0/+3
|
* - Regen for the sig*wait* system calls.jeff2003-03-315-11/+35
|
* - According to mike@FreeBSD.org SIGTHR should be hiden byjeff2003-03-311-3/+2
| | | | #ifdef __BSD_VISIBLE
* - Define sigwait, sigtimedwait, and sigwaitinfo in terms ofjeff2003-03-313-5/+178
| | | | | | kern_sigtimedwait() which is capable of supporting all of their semantics. - These should be POSIX compliant but more careful review is needed before we announce this.
* Revert change 1.201 (removing mapping of VAPPEND to VWRITE).thomas2003-03-311-32/+2
| | | | | | | | | | Instead, use the generic vaccess() operation to determine whether an operation is permitted. This avoids embedding knowledge on vnode permission bits such as VAPPEND in the NFS client. PR: kern/46515 vaccess() patch submitted by: "Peter Edwards" <pmedwards@eircom.net> Approved by: tjr, roberto (mentor)
* - Move the NEEDSIGCHK and OLDMASK flags from proc to thread.jeff2003-03-311-10/+11
| | | | | - Move the signal mask to the thread. - Adjust a few comments.
* - Move p->p_sigmask to td->td_sigmask. Signal masks will be per thread withjeff2003-03-3136-315/+449
| | | | | | | a follow on commit to kern_sig.c - signotify() now operates on a thread since unmasked pending signals are stored in the thread. - PS_NEEDSIGCHK moves to TDF_NEEDSIGCHK.
* Do NOT return from an non-interruptable cv_wait, falselyjulian2003-03-311-2/+0
| | | | claiming to have timed out. I don't know what I was thinking..
* - Fix two calls to trapsignal() that were still passing in 'struct proc'.jeff2003-03-312-4/+4
| | | | These were missed in my last commit.
* - Add a signal for thread synchronization. Add an XXX so that maybejeff2003-03-311-0/+4
| | | | | someone more knowledgeable on standards defined namespaces may ifdef this out.
* - Mark signals which may be delivered to any thread in the process withjeff2003-03-311-31/+32
| | | | | SA_PROC. Signals without this flag should be directed to a particular thread if this is possible.
* - Change trapsignal() to accept a thread and not a proc.jeff2003-03-3113-40/+40
| | | | | | | - Change all consumers to pass in a thread. Right now this does not cause any functional changes but it will be important later when signals can be delivered to specific threads.
* - Use sigexit() instead of twiddling the signal mask, catch, ignore, andjeff2003-03-313-25/+5
| | | | | action bits to allow SIGILL to work as expected. This brings this file in line with other architectures.
* Add a facility allowing processes to inform the VM subsystem they arewes2003-03-314-1/+19
| | | | | | | | critical and should not be killed when pageout is looking for more memory pages in all the wrong places. Reviewed by: arch@ Sponsored by: St. Bernard Software
* Add missing ()'s so that these drivers all compile again.jhb2003-03-3113-13/+13
| | | | | Noticed by: jake Tested on: i386 (compile)
* - Allow the physical memory size that will be actually used by the kernel tojake2003-03-312-2/+44
| | | | | | | | be overridden by setting hw.physmem. - Fix a vm_map_find arg, we don't want to find space. - Add tracing and statistics for off colored pages. - Detect "stupid" pmap_kenters (same virtual and physical as existing mapping), and do nothing in that case.
* If we fail to find our PCI ID in attach (this should never happen), thenjhb2003-03-311-2/+1
| | | | | just return ENXIO directly instead of calling tl_detach() since that would panic since the softc mutex isn't initialized until after this check.
* Remove some debugging in the new OAM[*] and add a debug flag for otherphk2003-03-312-5/+3
| | | | | | | | | parts of it. [*] I've been asked what "OAM" means: It's an acronym used in the telecom industry, "Operations And Maintenance", and there it covers anything from a single unlabeled led on the frontpanel the the full nightmare of CMIP for SS7.
* Match "serial" as well as "se".jake2003-03-311-1/+2
|
* Clean up locking and resource management for pci/if_*njl2003-03-3117-793/+711
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove locking of the softc in the attach method, instead depending on bus_setup_intr being at the end of attach (delaying interrupt enable until after ether_ifattach is called) - Call *_detach directly in the error case of attach, depending on checking in detach to only free resources that were allocated. This puts all resource freeing in one place, avoiding thinkos that lead to memory leaks. - Add bus_child_present check to calls to *_stop in the detach method to be sure hw is present before touching its registers. - Remove bzero softc calls since device_t should do this for us. - dc: move interrupt allocation back where it was before. It was unnecessary to move it. This reverts part of 1.88 - rl: move irq allocation before ether_ifattach. Problems might have been caused by allocating the irq after enabling interrupts on the card. - rl: call rl_stop before ether_ifdetach - sf: call sf_stop before ether_ifdetach - sis: add missed free of sis_tag - sis: check errors from tag creation - sis: move dmamem_alloc and dmamap_load to happen at same time as tag creation - sk: remove duplicate initialization of sk_dev - ste: add missed bus_generic_detach - ti: call ti_stop before ether_ifdetach - ti: add missed error setting in ti_rdata alloc failure - vr: add missed error setting in I/O, memory mapping cases - xl: add missed error setting in I/O, memory mapping cases - xl: remove multi-level goto on attach failure - xl: move dmamem_alloc and dmamap_load to happen at same time as tag creation - Calls to free(9) are unconditional because it is valid to call free with a null pointer. Reviewed by: imp, mdodd
* Recent changes to uipc_cow.c have eliminated the need for some sf_buf-alc2003-03-311-3/+3
| | | | | related variables to be global. Make them either local to sf_buf_init() or static.
* - In npxsetregs don't set the floating point if td == fpcurthread not ifjeff2003-03-313-3/+3
| | | | | curthread == fpcurthread. This is important when we're saving the fp state for a thread other than curthread as in from set_mcontext.
* Add the ability to send 64-bit scatter/gather elements to aac cards. Thisscottl2003-03-301-39/+78
| | | | | | | is enabled when both the size of bus_addr_t > 4 and the card claims support. Don't wake up the kthread to allocate more commands if we know that we've already allocated the max number of commands.
* retire the "busy" field in bioqueues, it's served it's purpose.phk2003-03-302-9/+0
|
* Fix ATA_DEBUG case breakage.sos2003-03-301-1/+1
|
* Preparation commit before I start on the bioqueue lockdown:phk2003-03-303-43/+46
| | | | | Collect all the bits of bioqueue handing in subr_disk.c, vfs_bio.c is big enough as it is and disksort already lives in subr_disk.c.
* Revert 1.21; this was local code that should not have beenmdodd2003-03-301-5/+5
| | | | committed.
* - Temporary fix so this compiles with 64 bit bus_addr_t.jake2003-03-301-1/+2
| | | | | Sponsored by: DARPA, Network Associates Laboratories Approved by: scottl
* - Add support for PAE and more than 4 gigs of ram on x86, dependent on thejake2003-03-3022-28/+436
| | | | | | | | | | kernel opition 'options PAE'. This will only work with device drivers which either use busdma, or are able to handle 64 bit physical addresses. Thanks to Lanny Baron from FreeBSD Systems for the loan of a test machine with 6 gigs of ram. Sponsored by: DARPA, Network Associates Laboratories, FreeBSD Systems
* Catch up with recent changes.mdodd2003-03-301-9/+5
|
* Switch rl_encap over to using m_defrag.silby2003-03-301-11/+1
| | | | | | | No functional change, the previous rl_encap was correct wrt long mbuf chains; this just reduces code duplication. MFC after: 2 weeks
* - We are not guaranteed that read ahead blocks are not in memory already.jeff2003-03-301-1/+9
| | | | | Check for B_DELWRI as well as B_CACHED before issuing io on a buffer. This is especially important since we are changing the b_iocmd.
* - Remove invalid casts.jake2003-03-304-6/+6
| | | | Sponsored by: DARPA, Network Associates Laboratories
* - Convert all uses of pmap_pte and get_ptbase to pmap_pte_quick. Whenjake2003-03-306-362/+224
| | | | | | | | | | | | accessing an alternate address space this causes 1 page table page at a time to be mapped in, rather than using the recursive mapping technique to map in an entire alternate address space. The recursive mapping technique changes large portions of the address space and requires global tlb flushes, which seem to cause problems when PAE is enabled. This will also allow IPIs to be avoided when mapping in new page table pages using the same technique as is used for pmap_copy_page and pmap_zero_page. Sponsored by: DARPA, Network Associates Laboratories
* The object type can't be OBJT_PHYS in vm_mmap().mux2003-03-301-1/+1
| | | | Reviewed by: peter
OpenPOWER on IntegriCloud