* make the 64/32 size warninsg go away
This commit was SVN r4195.
Этот коммит содержится в:
родитель
1e0e279de0
Коммит
f4b135a829
@ -125,7 +125,7 @@ static int str2size(char *str)
|
||||
|
||||
static void *thread_main(void *arg)
|
||||
{
|
||||
int rank = (int) arg;
|
||||
int rank = (int) (unsigned long) arg;
|
||||
int i;
|
||||
|
||||
verbose("thread-%d: Hello\n", rank);
|
||||
@ -142,7 +142,7 @@ static void *thread_main(void *arg)
|
||||
ompi_atomic_add(&valint, 5);
|
||||
}
|
||||
|
||||
return (void *) (rank + 1000);
|
||||
return (void *) (unsigned long) (rank + 1000);
|
||||
}
|
||||
|
||||
|
||||
@ -342,7 +342,7 @@ int main(int argc, char *argv[])
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
for (tid = 0; tid < nthreads; tid++) {
|
||||
if (pthread_create(&th[tid], NULL, thread_main, (void *) tid) != 0) {
|
||||
if (pthread_create(&th[tid], NULL, thread_main, (void *) (unsigned long) tid) != 0) {
|
||||
perror("pthread_create");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
@ -357,7 +357,7 @@ int main(int argc, char *argv[])
|
||||
perror("pthread_join");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
verbose("main: thread %d returned %d\n", tid, (int) thread_return);
|
||||
verbose("main: thread %d returned %d\n", tid, (int) (unsigned long) thread_return);
|
||||
}
|
||||
free(th);
|
||||
|
||||
|
@ -37,7 +37,7 @@ static void* atomic_spinlock_start(void* arg)
|
||||
{
|
||||
struct start_info *data = (struct start_info*) arg;
|
||||
|
||||
return (void*) atomic_spinlock_test(data->lock, data->count,
|
||||
return (void*) (unsigned long) atomic_spinlock_test(data->lock, data->count,
|
||||
data->tid);
|
||||
}
|
||||
|
||||
@ -75,7 +75,7 @@ atomic_spinlock_test_th(ompi_lock_t *lock, int count, int id, int thr_count)
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
ret += (int) thread_return;
|
||||
ret += (int) (unsigned long) thread_return;
|
||||
}
|
||||
free(data);
|
||||
free(th);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user