Hi,
This patch solves a small problem in librttest.
pthread_create's last argument should be argument to the func
the new thread will call instead of the thread structure
itself
Signed-Off-By: Chirag <[EMAIL PROTECTED]>
diff --git a/testcases/realtime/lib/librttest.c
b/testcases/realtime/lib/librttest.c
index 5e915eb..5406b8f 100644
--- a/testcases/realtime/lib/librttest.c
+++ b/testcases/realtime/lib/librttest.c
@@ -208,7 +208,7 @@ int create_thread(void*(*func)(void*), void *arg, int prio,
int policy)
pthread_attr_setschedparam(&thread->attr, ¶m);
pthread_attr_setschedpolicy(&thread->attr, thread->policy);
- if ((ret = pthread_create(&thread->pthread, &thread->attr, func,
(void*)thread))) {
+ if ((ret = pthread_create(&thread->pthread, &thread->attr, func,
thread->arg))) {
printf("pthread_create failed: %d (%s)\n", ret, strerror(ret));
list_del(&thread->_threads);
pthread_attr_destroy(&thread->attr);
--
Cheers,
Chirag Jog
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list