rt-migrate: Use int instead of pthread_t for thread IDs
PATCH 1/1 rt-migrate: Use int instead of pthread_t for thread IDs
pthread_t is opaque, but create_fifo_thread() returns integer therefore on musl where thread_t is not integer, this fails to compile e.g.
| rt-migrate.c:450:14: error: incompatible integer to pointer conversion assigning to 'pthread_t' (aka 'struct __pthread *') from 'int' [-Wint-conversion] | threads[i] = create_fifo_thread(start_task, (void *)i, | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Align the types used to fix the problems.
Signed-off-by Khem Raj <[email protected]>
--- testcases/realtime/func/rt-migrate/rt-migrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/realtime/func/rt-migrate/rt-migrate.c +1 -1
@@ -394,7 +394,7 @@ static void stop_log(int sig)int main (int argc,char **argv) { -pthread_t *threads; +int *threads;long i;int ret;struct timespec intv;
Signature · 5 lines
2.37.2 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi!
Applied, thanks.
Signature · 5 lines
Cyril Hrubis [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp