const qualifier to fail. This causes config.h to #define const to nothing,
which causes the whole compilation to fail.
What's the right way to fix this? I really like having -Werror.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@105
by the scheduler, not by generated code. So pass in the relevant
ThreadState*; don't get it from VG_(get_current_tid)().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@101
Fall back to a compromise position, which makes my mutex implementation
initialiser- and structure-compatible with LinuxThreads, and ditto the
upcoming condition var implementation. In particular this means that
((ThreadId)0) is an invalid thread ID, so vg_threads[0] is never used,
and vg_threads[1] specially denotes the "main" thread.
Remove the scheme of having a linked list of threads waiting on
each mutex. It is too difficult to get the right semantics for
when a signal is delivered to a thread blocked in pthread_mutex_lock().
Instead, use the old scheme of each thread stating with its .waited_on_mx
field, which mutex it is waiting for. This makes pthread_mutex_unlock()
less efficient, but at least it all works.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@100
for implementation of condition variables.
* Use the native pthread_mutex_t directly; we no longer have our own
VgMutex type nor a fixed array of them.
* Give ThreadState a new field q_next :: ThreadId, used to make a
linked list of threads waiting on a mutex, or condition variable.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@99
Various enhancements:
* Make the error message system more thread-aware.
* Fix stupid bug in do_pthread_create causing incorrect initial
%ESP values sometimes.
* Fix various other minor things needed to make opera work.
Performance of threaded apps is pretty terrible. This needs
looking into.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@98
we'd better annotate them as such!
Fixes a floating-point misbehaviour bug reported by Robert W. Anderson
<anderson110@poptop.llnl.gov>.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@95
VG_(unimplemented). In future this will not be enabled by default due
to the danger of recursion of assertion failures.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@92
of pthread event tracing. And allow this info to be passed across to
the client, where vg_libpthread.c uses it to also control verbosity.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@91
to run. Now it creates some threads but segfaults. Also add
wrapper for syscall __NR_mremap; it is way wrong, but finding
a decent description of what mremap() really does is nearly
impossible.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@89
cheaply, with the trivial-client-request mechanism. The latter is called
once per pthread call, even simple ones like pthread_mutex_[un]lock.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@88
on the client-request subsystem, and disabling it is no longer a
sensible thing to do.
Also: in the manual, mention flags --trace-sched= and --trace-pthread=.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@79
Turns out these insns are also available as Grp8 extensions, with
literal bit-offset values. Nuisance. I've #if 0'd out the old code
which implements them since am too lazy to fix them properly, and I
can't find any cases of their use anyway. I'll wait until someone
yelps.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@75
targets, although size-L (4-byte) only. In any event the jitter
doesn't handle the size 2 case and has never been asked too, AFAIK.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@74
* Didn't handle correctly operands in memory, where arbitrary signed
bit offsets are allowed. Prior impl will trash the client's stack
and give the wrong answer.
* Was done by a helper function and therefore could give spurious
value errors.
Now the address computations are done in-line.
Old implementation is there, but unused and scheduled for demolition.
Test case to follow.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@73
file vg_libpthread.so.0.c. Now:
* libpthread.so is built as just-another-so, like valgrind.so and
valgrinq.so.
* there is a new dummy target libpthread.so.0 which is build just
by a symlink.
Unfortunately for some reason, when the .so.0 is installed, it gets
a complete copy rather than just the symlink being copied. But it
works, at least.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@68
pthread_setspecific, pthread_getspecific. They don't do anything
right now and may well crash programs which use them.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@66
request to shutdown valgrind are done with the client request
mechanism too. This is much better than having to check all
call/return addresses.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@57