| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Like on libthr, there is an i386_set_gsbase() stub implementation here
to avoid libc.so.5 issues. This should likely be a weak symbol and I
expect this will be fixed soon.
Approved by: re
|
| |
|
|
|
|
|
| |
that the amd64 kernel implements i386_get/set_gsbase(). All the rest of
the ldt backwards compat code should go away soon.
|
|
|
|
|
| |
This is a little hairy here because the allocation and usage of this
functionality is split into two places in libpthread.
|
| |
|
|
|
|
| |
ARM_TP_ADDRESS.
|
|
|
|
|
| |
kernels. Use the recently exposed direct-set routines instead. This is
only activated for when we compile i386 support libraries on amd64.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Reviewed by: deischen
|
| |
|
| |
|
|
|
|
| |
2. Export symbols needed by debugger.
|
| |
|
|
|
|
| |
kse_switchin syscall.
|
| |
|
|
|
|
| |
athlon64 machine.
|
|
|
|
| |
the time being.
|
| |
|
| |
|
| |
|
|
|
|
| |
_amd64_restore_context().
|
|
|
|
| |
as stubs.
|
|
|
|
|
|
|
|
| |
These files had tags after teh copyright notice,
inside the comment block (incorrect, removed),
and outside the comment block (correct).
Approved by: rwatson (mentor)
|
|
|
|
|
|
|
|
|
| |
flags. We now create asynchronous contexts or syscall contexts only.
Syscall contexts differ from the minimal ABI dictated contexts by
having the scratch registers saved and restored because that's where
we keep the syscall arguments and syscall return values.
Since this change affects KSE, have it use kse_switchin(2) for the
"new" syscall context.
|
|
|
|
|
|
|
|
|
|
|
| |
UTS with the stack correctly aligned. Also, while here, use an indirect
jump rather than the pushq/ret hack.
This fixes threaded apps that use floating point for me, although
it hasn't solved all the problems. It is an improvement though.
Preservation of the 128 byte red zone hasn't been resolved yet.
Approved by: re (scottl)
|
|
|
|
|
|
| |
helps branch predict a lot for INTEL P4.
Approved by: re (scottl)
|
| |
|
|
|
|
|
|
|
| |
about the fpu code here. It should be using fxsave/fxrstor instead of
saving/restoring the control word. The SSE registers are used a lot in
gcc generated code on amd64. I'm not sure how this all fits together
though.
|
| |
|
|
|
|
|
| |
The first argument is the UTS function, the second argument is the
first argument to the UTS function. Who's on first.
|
|
|
|
|
| |
return 0 when called the first time, and return 1 when resumed by
thr_setcontext().
|
|
|
|
|
|
|
|
| |
yet work, but hopefully someone familiar with the sparc64
port can pick up the reins.
Submitted by: jake
With mods by: deischen
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
pthread_md.h. This commit only moves the definition; it does not
change it for any of the platforms. This more easily allows 64-bit
architectures (in particular) to pick a slightly larger stack size.
|
|
|
|
|
|
|
|
|
|
|
|
| |
THR_SETCONTEXT as PANIC(). The THR_SETCONTEXT macro is currently not
used, which means that the definition we had could be wrong, overly
pessimistic or unknowingly right. I don't like the odds...
The new _ia64_break_setcontext() and corresponding kernel fixes make
KSE mostly usable. There's still a case where we don't properly
restore a context and end up with a NaT consumption fault (typically
an indication for not handling NaT collection points correctly),
but at least now mutex_d works...
|
|
|
|
|
| |
Instead use the break instruction with an immediate specially
created for us.
|
|
|
|
|
|
|
|
|
|
|
| |
state for amd64 was twice as large as necessary. Peter
recently fixed this, so the comment no longer applies.
Also, since the size of struct mcontext changed, adjust
the threads library version of get&set context to match.
FYI, any change layout/size change to any arch's struct
mcontext will likely need some minor changes in libpthread.
|
|
|
|
|
|
|
|
|
|
|
|
| |
instead of long types for low-level locks.
Add prototypes for some internal libc functions that are
wrapped by the library as cancellation points.
Add memory barriers to alpha atomic swap functions (submitted
by davidxu).
Requested by: bde
|
| |
|
|
|
|
|
|
| |
there is still some missing kernel support.
Reviewed by: marcel
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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).
|