2 * This file, unlike checkers.c, is maintained manually because these
3 * checks for some reason cannot be done manually
5 int fprintf(FILE *stream
, const char *format
, ...)
9 return vfprintf(stream
, format
, ap
);
12 int printf(const char *format
, ...)
16 return vprintf(format
, ap
);
19 int pthread_cond_timedwait(pthread_cond_t
* cond
, pthread_mutex_t
* mutex
, const struct timespec
* abstime
)
21 static int (*func
)(pthread_cond_t
*, pthread_mutex_t
*, const struct timespec
* abstime
);
25 printf("pthread_cond_timedwait() is called while in rt section\n");
26 #if ABORT_ON_VIOLATION
32 //func = (int (*)(pthread_cond_t*, pthread_mutex_t*)) dlsym(RTLD_NEXT, "pthread_cond_wait");
33 // see http://forums.novell.com/novell-product-support-forums/suse-linux-enterprise-server-sles/sles-configure-administer/385705-sles-10-2-java-hung-calling-pthread_cond_timedwait.html
34 func
= (int (*)()) dlvsym(RTLD_NEXT
, "pthread_cond_timedwait", "GLIBC_2.3.2");
37 fprintf(stderr
, "Error dlsym'ing\n");
40 return(func(cond
, mutex
, abstime
));
44 int pthread_cond_wait(pthread_cond_t
* cond
, pthread_mutex_t
* mutex
)
46 static int (*func
)(pthread_cond_t
*, pthread_mutex_t
*);
50 printf("pthread_cond_wait() is called while in rt section\n");
51 #if ABORT_ON_VIOLATION
57 //func = (int (*)(pthread_cond_t*, pthread_mutex_t*)) dlsym(RTLD_NEXT, "pthread_cond_wait");
58 // see http://forums.novell.com/novell-product-support-forums/suse-linux-enterprise-server-sles/sles-configure-administer/385705-sles-10-2-java-hung-calling-pthread_cond_timedwait.html
59 func
= (int (*)(pthread_cond_t
*, pthread_mutex_t
*)) dlvsym(RTLD_NEXT
, "pthread_cond_wait", "GLIBC_2.3.2");
62 fprintf(stderr
, "Error dlsym'ing\n");
65 return(func(cond
, mutex
));