Commit Graph

49 Commits

Author SHA1 Message Date
Tom Hughes
b7229cb4fc Implement pthread_mutex_timedlock. This resolves bug 78422.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2780
2004-10-17 15:00:20 +00:00
Tom Hughes
6204049d43 Add a dummy implementation of pthread_attr_getinheritsched.
BUG: 79495


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2775
2004-10-16 14:24:43 +00:00
Tom Hughes
5aa943f129 Implement pthread_mutexattr_gettype.
CCMAIL: 91199-done@bugs.kde.org


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2759
2004-10-13 18:29:54 +00:00
Tom Hughes
c8932f4011 Back out yesterday's change to the symbol versioning in the pthread
library - it seems that I misunderstood hom the versioning works and
a system looking for a GLIBC_PRIVATE version of the clock routines
would not find the GLIB_2.2.3 one even with the inheritance. It only
seemed to be working on glibc 2.3 systems because of the version
overrides in the source code, but it failed on glibc 2.2.5 systems.

The new approach is to explicity create two versions of the routines
in question, one with a version of GLIBC_2.2.3 and one with a version
of GLIBC_PRIVATE instead. This has been tested on six different systems
and appears to work everywhere.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2586
2004-08-15 14:11:12 +00:00
Tom Hughes
03df333128 Commit the patch from bug 69508 that seeks to make more of the pthread
stack attribute related functions work properly as it seems to be a
sensible thing to improve even if it isn't enough to get the JVM running
under valgrind now.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2444
2004-06-27 12:48:53 +00:00
Tom Hughes
b769d6df88 Implement tcdrain in the pthread library. The fact that this function
is missing was reported in bug #70344 but the reporter then closed the
bug saying that they were using the wrong version of valgrind.

Patch from Henrik Algestam <algestam@home.se>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2346
2004-03-31 15:23:13 +00:00
Nicholas Nethercote
07b8e3438b Updated copyright dates for 2004. Also added a couple of missing headers and
footers to some new files.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2177
2004-01-04 16:43:23 +00:00
Julian Seward
b3e4bdb2a5 Implement pthread_spinlock_* (Tim Potter, tpot@samba.org)
MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1902
2003-10-12 08:33:30 +00:00
Julian Seward
cceee45f87 Implement pthread_mutexattr_setpshared (Nick did this).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1724
2003-07-06 01:23:11 +00:00
Julian Seward
76ffe12471 Add possibly-bogus implementations for __libc_current_sigrtmin,
__libc_current_sigrtmax and __libc_allocate_rtsig.

MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1561
2003-04-26 21:19:53 +00:00
Nicholas Nethercote
ac7027c441 Updated copyright notices for 2003. Only 4 months late.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1526
2003-04-15 14:58:06 +00:00
Julian Seward
18722f68c7 Implement pthread_getconcurrency, in the same way as LinuxThreads does it.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1393
2002-12-26 12:16:11 +00:00
Julian Seward
1c1de878a1 Implement (nop, but that's OK according to POSIX) pthread_set_concurrency.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1355
2002-12-08 23:51:32 +00:00
Julian Seward
a3feec4235 Implement (as a nop) pthread_rwlockattr_destroy.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1354
2002-12-08 23:42:17 +00:00
Julian Seward
4a133a6408 merge revs
vg_libpthread.c       1.90.2.10
   vg_libpthread_unimp.c 1.30.2.5

Implement (sort-of) pthread_attr_{set,get}guardsize.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1240
2002-10-20 16:22:57 +00:00
Julian Seward
695aaac7c1 merge revs
vg_libpthread.c 1.90.2.9
   vg_libpthread_unimp.c 1.30.2.4

Add sem_timedwait().  From Scott Smith <sls@cs.unt.edu>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1238
2002-10-16 19:45:06 +00:00
Julian Seward
a3d1803851 Initial stuff to make it work on Red Hat 8:
- autoconf stuff for detecting glibc-2.3

- vg_libpthread_unimp.c: hack for __pthread_clock_[gs]ettime

- vg_libpthread.c: initialise thread's default locale by calling
  __uselocale(LC_GLOBAL_LOCALE) at the right time.  Gruesome.
  Also need to do this for new other threads - not yet done.

- cleanups -- don't use write() to write messages when bombing out,
  instead go direct to the syscalls.  Avoids nasty circularities
  with glibc initialisations.

MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1207
2002-10-07 23:56:55 +00:00
Nicholas Nethercote
089e7e3bcb Updated file descriptions in the copyright notices to reflect the core/skin
split.  Each skin now has its own two-line description.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1166
2002-10-02 13:26:35 +00:00
Nicholas Nethercote
afebe61b37 Files updated, added and removed in order to turn the ERASER branch into HEAD
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1086
2002-09-23 09:36:25 +00:00
Julian Seward
66d6958565 Copy pthread_rwlockattr_setpshared verbatim from LinuxThreads.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@498
2002-07-13 12:58:44 +00:00
Julian Seward
2bdcd29d63 Implement pause().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@442
2002-06-19 10:17:40 +00:00
Julian Seward
b05ceff761 Do pthread_rwlockattr_init.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@440
2002-06-18 09:24:34 +00:00
Julian Seward
7351752815 Do siglongjmp, although without running cleanup handlers in the section
of stack which it skips over.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@438
2002-06-18 09:07:54 +00:00
Julian Seward
f34cee7b2f Add pthread_attr_setschedpolicy / pthread_attr_getschedpolicy.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@431
2002-06-17 12:19:44 +00:00
Julian Seward
e6f8b8949a Cancellation wrapper for recvmsg.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@392
2002-06-06 08:33:54 +00:00
Julian Seward
c5b0a61b28 Inch towards JVM (Sun, 1.4.0) working.
- Thread stack size = 1 Meg
- Alias for __pthread_kill_other_threads_np
Now at least valgrind doesn't crash/assert.  Still doesn't work tho.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@373
2002-06-04 08:38:04 +00:00
Julian Seward
30b7d97214 More RH 7.3 fixes
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@369
2002-06-03 23:12:58 +00:00
Julian Seward
a75be28f6f Failed attempt to make JDK 1.4.0 work.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@361
2002-06-03 00:58:18 +00:00
Julian Seward
501f08d781 Do pthread_atter_{set,get}scope.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@360
2002-06-02 09:29:31 +00:00
Julian Seward
dbd505a061 Support for POSIX reader-writer locks (preliminary).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@325
2002-05-27 13:00:05 +00:00
Julian Seward
09846794fc More minor fixes to make OpenOffice 1.0 work.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@321
2002-05-24 02:11:32 +00:00
Julian Seward
cce8a3ebd3 Implement pthread_yield.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@308
2002-05-22 13:17:31 +00:00
Julian Seward
8d2d128371 Don't mask libc's vfork / __vfork:
$ nm /lib/libc-2.2.4.so | grep vfork
   000b4220 T __vfork
   000b4220 W vfork

There's no __libc_vfork, so there's nothing we can do here.
Just don't supply our own version.

Not at all sure if this is correct.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@303
2002-05-21 00:51:21 +00:00
Julian Seward
2560fc9e47 Cancellation wrappers for pread/pwrite (Philip Martin).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@287
2002-05-18 10:56:27 +00:00
Julian Seward
a57b808f60 Cancellation wrapper for __pwrite64 (Adam Zell(?))
Be more paranoid in pthread_attr_setstacksize


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@285
2002-05-18 10:43:22 +00:00
Julian Seward
a1b75f8383 Cancellation wrapper for pread64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@283
2002-05-16 23:39:10 +00:00
Julian Seward
f3067ffa5d Minimal impl of pthread_attr_setstacksize.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@279
2002-05-16 20:51:15 +00:00
Julian Seward
9360e0621c Cancellation wrapper for sendmsg(), wierd wrapper for raise().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@278
2002-05-16 16:57:25 +00:00
Julian Seward
30199fec47 In accordance with "build one to throw away, you will anyway (tm)",
throw away the old signals simulation and more or less start again
from scratch.  vg_signals.c is nearly a complete rewrite.  In fact
this is now the third generation of the signals simulation.

The purpose of this is to properly support signals in threads -- a
nightmare combination.  pthread_sigmask, pthread_kill and sigwait
are now alledged to work as POSIX requires.

In the process, throw away confusing and conceptually muddled old
implementation and replace with something which is more verbose but
conceptually cleaner, simpler and easier to argue is correct.

* When the client does sigaction/sigprocmask et al, the resulting
  changes are stored verbatim in SCSS -- the Static Client Signal State.
  So SCSS is the state the client believes the kernel is in.

* Every time SCSS changes, we recalculate the state the kernel
  *should* be in so that our signal simulation works.  This is the
  SKSS -- Static Kernel Signal State.  The kernel state is then
  updated accordingly.  By diffing the new and old SKSSs, the
  number of real system calls made is minimised.

* The dynamic state of the client's signals is stored in DCSS
  -- Dynamic Client Signal State.  This just records which signals
  are pending for which threads.

The big advantage of this scheme over the previous is that the SCSS ->
SKSS mapping is made explicit and gathered all in one place, rather
than spread out in a confusing way and done implicitly.  That makes it
all lot easier to decide if the mapping, which is really the heart of
the signals simulation, is correct or not.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@271
2002-05-15 21:13:39 +00:00
Julian Seward
0ba6f33e4f Add support for pthread_sigmask() and sigwait(). All absolutely
horrible, especially the latter.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@266
2002-05-13 00:16:03 +00:00
Julian Seward
8b15df18c2 Change _pthread_cleanup_push and _pthread_cleanup_pop into no-ops
rather than aborts.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@237
2002-05-08 14:08:22 +00:00
Julian Seward
9518212384 Do __pthread_initialize.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@236
2002-05-08 02:01:14 +00:00
Julian Seward
be21872520 Various cleanups following earlier exit fixes. Also add boilerplate
copyright notices.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@204
2002-05-03 20:43:10 +00:00
Julian Seward
c082a81f8f Fix more stuff broken by recent exported-symbol hackery.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@156
2002-04-26 21:01:13 +00:00
Julian Seward
205ec6efd2 Finish first pass of the symbols cleanup. Only versioned symbols remain
to do.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@155
2002-04-26 14:31:40 +00:00
Julian Seward
66b4d0b7ca Mess around with aliases to make the exported T/D/W syms look like those
of the real libpthread.so.  This is a Good Thing, despite the fact it
temporarily breaks some threaded programs.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@153
2002-04-26 13:25:00 +00:00
Julian Seward
edf9ed279b Fix many holes and bugs in an attempt to get my libpthread.so to export
the same set of symbols as the real one, which I now realise is crucial
for it to work at all.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@151
2002-04-26 03:28:18 +00:00
Julian Seward
a70e548ee7 Fix various bugs getting in the way of licq starting up.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@150
2002-04-26 00:27:53 +00:00
Julian Seward
c107508a0f Try and give at least some minimal binding for all functions exported
by the real libpthread.so.  In the process fix a bunch of stuff, including
adding thread-specific h_errno and resolver state storage.  This fixes
licq crashing at startup.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@149
2002-04-25 20:17:29 +00:00