* [LTP] [PATCH] rt-migrate: Use int instead of pthread_t for thread IDs
@ 2022-08-24 6:25 Khem Raj
2022-08-24 8:31 ` Cyril Hrubis
0 siblings, 1 reply; 2+ messages in thread
From: Khem Raj @ 2022-08-24 6:25 UTC (permalink / raw)
To: ltp; +Cc: Khem Raj
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 <raj.khem@gmail.com>
---
testcases/realtime/func/rt-migrate/rt-migrate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/realtime/func/rt-migrate/rt-migrate.c b/testcases/realtime/func/rt-migrate/rt-migrate.c
index 3e6c82a2f..97ab604c7 100644
--- a/testcases/realtime/func/rt-migrate/rt-migrate.c
+++ b/testcases/realtime/func/rt-migrate/rt-migrate.c
@@ -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;
--
2.37.2
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [LTP] [PATCH] rt-migrate: Use int instead of pthread_t for thread IDs
2022-08-24 6:25 [LTP] [PATCH] rt-migrate: Use int instead of pthread_t for thread IDs Khem Raj
@ 2022-08-24 8:31 ` Cyril Hrubis
0 siblings, 0 replies; 2+ messages in thread
From: Cyril Hrubis @ 2022-08-24 8:31 UTC (permalink / raw)
To: Khem Raj; +Cc: ltp
Hi!
Applied, thanks.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-24 8:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-24 6:25 [LTP] [PATCH] rt-migrate: Use int instead of pthread_t for thread IDs Khem Raj
2022-08-24 8:31 ` Cyril Hrubis
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.