summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* o There are 6 trap disable bits in ar.fpsr, not five. Even though wemarcel2003-08-092-4/+4
| | | | | | | | | | | | | didn't provide a constant for one of them (non-IEEE denormal trap), in an attempt to not support it probably, it's not we are left with the lower 5 bits. o Properly mask the passed or returned fp_except_t. Not doing so causes instant core dumps by trying to write an invalid value to ar.fpsr. Now that we're masking, stop using exclusive-or to invert bits. This fixes the illegal instruction fault encountered when building mozilla.
* Add libpthread to the alpha build.deischen2003-08-091-9/+3
| | | | | | Requested by ru: Since the majority of archs can now support the build of libpthread, rearrange the Makefile to treat libpthread as an exception.
* Add alpha support to libpthread. It compiles but hasn't been tested;deischen2003-08-096-1/+761
| | | | | | there is still some missing kernel support. Reviewed by: marcel
* Add signalcontext() which will be needed by libpthread.deischen2003-08-092-1/+104
| | | | Reviewed by: marcel
* Add the POSIX 1003.1-2001 posix_madvise() interface.bms2003-08-094-4/+29
| | | | | | PR: standards/54634 Reviewed by: das Approved by: jake (mentor)
* o Add code to GC freed KSEs and KSE groupsdavidxu2003-08-082-50/+232
| | | | | | | o Fix a bug in kse_free_unlocked(), kcb_dtor shouldn't be called because the KSE is cached and will be resued in _kse_alloc(). Reviewed by: deischen
* Since it builds and seems to work OK, add libpthread to the amd64 build.deischen2003-08-081-0/+3
|
* Remove stale DCE 1.1 pointers to the IBM site. The URLs aren't validmarcel2003-08-088-8/+0
| | | | anymore. This also fixes long line bugs caused by the lengthy URLs :-)
* Fix markup for uuid_equal()marcel2003-08-081-1/+2
|
* Fix two (2) bugs in one (1) statement:marcel2003-08-081-1/+4
| | | | | | | | | | | | | o fix the len argument of memcmp(3) to be the size of the node field of the uuid structure, not the size of the uuid structure itself. We're comparing the node fields... o uuid_compare(3) is specified to return -1, 0 or 1, depending on the outcome of the comparison. memcmp(3) returns the difference between the first differing bytes. Hence, we cannot ever return the return value of memcmp(3) as-is. PR: standards/55370 Submitted by: Konstantin Oznobihin <bork@rsu.ru>
* Implement signalcontext.jake2003-08-082-2/+78
|
* Allow gcc driver to process -r option iself, do not use -Wl,-r tokan2003-08-082-2/+2
| | | | | | | bypass it. Doing otherwise did not allow compiler to detect and disable conflicting options generated from specs. Reported by: jake
* Implement mblen(s, n) as mbtowc(NULL, s, n) to avoid calling sgetrune()tjr2003-08-071-26/+9
| | | | | and to simplify things. This is only valid until we start supporting state-dependent encodings.
* Implement mbstowcs() as a wrapper around mbsrtowcs(), and wcstombs()tjr2003-08-072-115/+24
| | | | as a wrapper around wcsrtombs().
* Grok async contexts. When a thread is interrupted and an upcallmarcel2003-08-074-18/+82
| | | | | | | | | | | | | | | | | | | | | happens, the context of the interrupted thread is exported to userland. Unlike most contexts, it will be an async context and we cannot easily use our existing functions to set such a context. To avoid a lot of complexity that may possibly interfere with the common case, we simply let the kernel deal with it. However, we don't use the EPC based syscall path to invoke setcontext(2). No, we use the break-based syscall path. That way the trapframe will be compatible with the context we're trying to restore and we save the kernel a lot of trouble. The kind of trouble we did not want to go though ourselves... However, we also need to set the threads mailbox and there's no syscall to help us out. To avoid creating a new syscall, we use the context itself to pass the information to the kernel so that the kernel can update the mailbox. This involves setting a flag (_MC_FLAGS_KSE_SET_MBOX) and setting ifa (the address) and isr (the value).
* Implement mbtowc() in terms of mbrtowc(), and wctomb() in terms of wcrtomb().tjr2003-08-072-53/+42
|
* Implement btowc() in terms of mbrtowc() instead of sgetrune(), andtjr2003-08-072-10/+27
| | | | | | | | | wctob() in terms of wcrtomb() instead of sputrune(). There should be no functional differences, but there may be a small performance hit because we make an extra function call. The aim here is to have as few functions as possible calling s{get,put}rune() to make it easier to remove them in the future.
* Document that connect(2) can return EINTR, and that ityar2003-08-061-3/+6
| | | | can return EALREADY for a socket in blocking mode as well.
* Fix a typo. s/Line/Like/deischen2003-08-062-2/+2
|
* Avoid a level of indirection to get from the thread pointer to themarcel2003-08-064-78/+54
| | | | | | | | | | | TCB. We know that the thread pointer points to &tcb->tcb_tp, so all we have to do is subtract offsetof(struct tcb, tcb_tp) from the thread pointer to get to the TCB. Any reasonably smart compiler will translate accesses to fields in the TCB as negative offsets from TP. In _tcb_set() make sure the fake TCB gets a pointer to the current KCB, just like any other TCB. This fixes a NULL-pointer dereference in _thr_ref_add() when it tried to get the current KSE.
* Don't call kse_set_curthread() when scheduling a new bounddeischen2003-08-062-4/+6
| | | | | | | thread. It should only be called by the current kse and never by a KSE on behalf of another. Submitted by: davidxu
* Fix an off by one error in the number of arguments passed tomarcel2003-08-062-2/+2
| | | | | | makecontext(). We only supply 3, not 4. This is mostly harmless, except that on ia64 the garbage can include NaT bits, resulting in NaT consumption faults.
* Define the static TLS as an array of long double. This will guaranteemarcel2003-08-062-4/+12
| | | | | | | that the TLS is 16-byte aligned, as well as guarantee that the thread pointer is 16-byte aligned as it points to struct ia64_tp. Likewise, struct tcb and struct ksd are also guaranteed to be 16-byte aligned (if they weren't already).
* Use auto LDT allocation for i386.deischen2003-08-052-126/+12
|
* Rethink the MD interfaces for libpthread to account fordeischen2003-08-0537-960/+2077
| | | | | | | | | archs that can (or are required to) have per-thread registers. Tested on i386, amd64; marcel is testing on ia64 and will have some follow-up commits. Reviewed by: davidxu
* Define THR_GETCONTEXT and THR_SETCONTEXT in terms of the userlandmarcel2003-08-052-8/+10
| | | | | | | | | context functions. We don't need to enter the kernel anymore. The contexts are compatible (ie a context created by getcontext() can be restored by _ia64_restore_context()). While here, make the use of THR_ALIGNBYTES and THR_ALIGN a no-op. They are going to be removed anyway.
* o In _ia64_save_context() clear the return registers except for r8.marcel2003-08-052-26/+50
| | | | | | | | | | We write 1 for r8 in the context so that _ia64_restore_context() will return with a non-zero value. _ia64_save_context() always return 0. o In _ia64_restore_context(), don't restore the thread pointer. It is not normally part of the context. Also, restore the return registers. We get called for contexts created by getcontext(), which means we have to restore all the syscall return values.
* add support for using kqueue to watch bpf sockets.jmg2003-08-051-1/+8
| | | | | Submitted by: Brian Buchanan of nCircle, Inc. Tested on: i386 and sparc64
* LANG->LC_ALLache2003-08-041-1/+1
| | | | Pointed by: ru
* Allow foot shooting as Linux emulation needs it.julian2003-08-041-1/+2
| | | | | | | | | Also change "Auto mode" to use a "special" value instead of 0, and define and document it. I had thought libpthread had already been switched to use auto mode but it appears that patch hasn't been committed yet. Discussed with: Davidxu
* Fix problem differently, useache2003-08-041-1/+1
| | | | | LANG=C tr 'a-z' 'A-Z' for hypotetical case that script may generate non-ascii characters
* Fix double-wrong tr usage: tr '[a-z]' '[A-Z]'ache2003-08-041-1/+1
| | | | | | | | First of all, it should be written as: tr 'a-z' 'A-Z' ranges not encolosed in [] according to POSIX, so [] just included in the replacement. Second, it should be written: tr '[:lower:]' '[:upper:]' since a-z and A-Z may have different length in some locales.
* Restore including of "collate.h", for its own prototype (mis)match detectionache2003-08-031-0/+1
|
* Remove commented out and never used codeache2003-08-031-34/+1
|
* Remove __collate_range_cmp() stabilization, it conflicts with rangesache2003-08-031-10/+2
|
* -15 is incorrect to be used to align stack to 16 bytes, use ~15 instead.davidxu2003-08-022-2/+2
|
* Override the default stubs for getcontext(2) and swapcontext(2) somarcel2003-08-023-2/+80
| | | | | | | | | | | | | that we can flush the register stack prior to entering the kernel. This avoids having dirty registers and saves us from having to manually write them to the backing store from within the kernel. In that respect, flushing the RSE is both functionally required as well as performance optimal. On average we had 18 dirty registers when getcontext(2) was called from libthr. Since libthr does not switch back to a context created by getcontext(2), not having dealt with the dirty registers was harmless.
* The END() must expand to the .endp directive with the same name asmarcel2003-08-013-6/+5
| | | | | | | on the corresponding .proc directive, or the .endp must not have a name at all. While here, remove an artificial dependency in Ovfork.S by performing manual register renaming.
* Use FSBase to map kse, GCC generates code which uses %fs to access TLS data.davidxu2003-07-311-4/+4
| | | | Reminded by: marcel
* Remove unnecssary <vm/swap_pager.h> includes.phk2003-07-313-3/+0
| | | | | These were probably not cleaned up back in whatever murky past these files were split into separate files.
* Remove various unused variables, prototypes and local variables.phk2003-07-311-25/+0
|
* Disable and lobotomize the kvm image reading swapinfo code, the kernelphk2003-07-311-125/+1
| | | | | | layout is about to change. The sysctl based method still returns correct information.
* Retire the SWIF_DUMP_TREE code, this is in the way for a rework ofphk2003-07-312-191/+0
| | | | the swap_pager layout.
* This file hasn't been used for some time; nuke it.deischen2003-07-311-42/+0
|
* Take the same approach for i386 as that for ia64 and amd64. Usedeischen2003-07-319-339/+150
| | | | | | | | | the userland version of [gs]etcontext to switch between a thread and the UTS scheduler (and back again). This also fixes a bug in i386 _thr_setcontext() which wasn't properly restoring the context. Reviewed by: davidxu
* Unifdef -UDEBUG_SWAPINFO The kernel data structures are about to change.phk2003-07-311-79/+0
|
* Set GSBASE for kse. Finally make libkse work on AMD64.davidxu2003-07-311-6/+3
|
* Fix some typos, correctly jump into UTS.davidxu2003-07-312-4/+4
|
* sysctlbyname needs size_t type, not int.davidxu2003-07-312-2/+2
|
* Cross-reference arc4random(3).das2003-07-311-0/+4
|
OpenPOWER on IntegriCloud