Author: sewardj
Date: 2007-10-25 17:09:46 +0100 (Thu, 25 Oct 2007)
New Revision: 7032

Log:
Fix intercepts for sem_wait and sem_post on 32-bit systems.

Modified:
   branches/THRCHECK/thrcheck/tc_intercepts.c


Modified: branches/THRCHECK/thrcheck/tc_intercepts.c
===================================================================
--- branches/THRCHECK/thrcheck/tc_intercepts.c  2007-10-25 09:45:57 UTC (rev 
7031)
+++ branches/THRCHECK/thrcheck/tc_intercepts.c  2007-10-25 16:09:46 UTC (rev 
7032)
@@ -844,7 +844,8 @@
                        const struct timespec *restrict abs_timeout);
 */
 
-/* glibc-2.5 has sem_init@@GLIBC_2.2.5; match [EMAIL PROTECTED] */
+/* glibc-2.5 has sem_init@@GLIBC_2.2.5 (amd64-linux)
+             and sem_init@@GLIBC_2.1 (x86-linux): match [EMAIL PROTECTED] */
 PTH_FUNC(int, semZuinitZAZa, sem_t* sem, int pshared, unsigned long value)
 {
    OrigFn fn;
@@ -874,7 +875,8 @@
 }
 
 
-/* glibc-2.5 has sem_destroy@@GLIBC_2.2.5; match [EMAIL PROTECTED] */
+/* glibc-2.5 has sem_destroy@@GLIBC_2.2.5 (amd64-linux)
+             and sem_destroy@@GLIBC_2.1 (x86-linux); match [EMAIL PROTECTED] */
 PTH_FUNC(int, semZudestroyZAZa, sem_t* sem)
 {
    OrigFn fn;
@@ -903,9 +905,10 @@
 }
 
 
-/* glibc-2.5 has sem_wait; match sem_wait */
+/* glibc-2.5 has sem_wait (amd64-linux); match sem_wait
+             and sem_wait@@GLIBC_2.1 (x86-linux); match [EMAIL PROTECTED] */
 /* wait: decrement semaphore - acquire lockage */
-PTH_FUNC(int, semZuwait, sem_t* sem)
+static int sem_wait_WRK(sem_t* sem)
 {
    OrigFn fn;
    int    ret;
@@ -931,11 +934,18 @@
 
    return ret;
 }
+PTH_FUNC(int, semZuwait, sem_t* sem) { /* sem_wait */
+   return sem_wait_WRK(sem);
+}
+PTH_FUNC(int, semZuwaitZAZa, sem_t* sem) { /* [EMAIL PROTECTED] */
+   return sem_wait_WRK(sem);
+}
 
 
-/* glibc-2.5 has sem_post; match sem_post */
+/* glibc-2.5 has sem_post (amd64-linux); match sem_post
+             and sem_post@@GLIBC_2.1 (x86-linux); match [EMAIL PROTECTED] */
 /* post: increment semaphore - release lockage */
-PTH_FUNC(int, semZupost, sem_t* sem)
+static int sem_post_WRK(sem_t* sem)
 {
    OrigFn fn;
    int    ret;
@@ -962,8 +972,15 @@
 
    return ret;
 }
+PTH_FUNC(int, semZupost, sem_t* sem) { /* sem_post */
+   return sem_post_WRK(sem);
+}
+PTH_FUNC(int, semZupostZAZa, sem_t* sem) { /* [EMAIL PROTECTED] */
+   return sem_post_WRK(sem);
+}
 
 
+
 /*----------------------------------------------------------------*/
 /*--- Qt 4 threading functions (w/ GNU name mangling)          ---*/
 /*----------------------------------------------------------------*/


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Valgrind-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-developers

Reply via email to