aboutsummaryrefslogtreecommitdiff
path: root/net/spserver/files/patch-testthreadpool.cpp
blob: 3fdb99f80927f6a9a25af5861b57532bd765113e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- spserver/testthreadpool.cpp.orig	2008-05-24 11:47:36.000000000 +0800
+++ spserver/testthreadpool.cpp	2008-05-24 18:34:57.000000000 +0800
@@ -18,10 +18,10 @@
 
 void threadFunc( void *arg )
 {
-	int seconds = (int) arg;
+	int seconds = atoi ((char *)arg);
 
 	fprintf( stdout, "  in threadFunc %d\n", seconds );
-	fprintf( stdout, "  thread#%ld\n", sp_thread_self() );
+	fprintf( stdout, "  thread#%ld\n", (long int)sp_thread_self() );
 	sleep( seconds );
 	fprintf( stdout, "  done threadFunc %d\n", seconds);
 }