From f9afe354bf3e052b7d785fe13df10c1a8a7bd0ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 7 Jan 2003 09:56:33 +0000 Subject: [PATCH] Added some calls to find_thread(NULL) which does now work as expected (as it uses TLS, have a look at OS.h). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2383 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/apps/tls_test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/kernel/apps/tls_test.c b/src/kernel/apps/tls_test.c index b83838df9c..a2f044165b 100644 --- a/src/kernel/apps/tls_test.c +++ b/src/kernel/apps/tls_test.c @@ -32,7 +32,7 @@ read_fs_register(void) static int32 thread1_func(void *data) { - printf("1. stack at: %p\n", &data); + printf("1. stack at %p, thread id = %ld\n", &data, find_thread(NULL)); printf("1. TLS address = %p\n", tls_address(gSlot)); tls_set(gSlot, (void *)"thread 1"); printf("1. TLS get = \"%s\" (should be \"thread 1\")\n", (char *)tls_get(gSlot)); @@ -48,7 +48,7 @@ thread1_func(void *data) static int32 thread2_func(void *data) { - printf("2. stack at: %p\n", &data); + printf("2. stack at %p, thread id = %ld\n", &data, find_thread(NULL)); printf("2. TLS address = %p\n", tls_address(gSlot)); printf("2. TLS get = \"%s\" (should be NULL)\n", (char *)tls_get(gSlot)); @@ -69,7 +69,7 @@ main(int argc, char **argv) gWait = create_sem(0, "waiter"); gSlot = tls_allocate(); - printf("got slot %ld : %p\n", gSlot, &thread1); + printf("got slot %ld, stack at %p, thread id = %ld\n", gSlot, &thread1, find_thread(NULL)); #if __INTEL__ printf("FS register is %p\n", read_fs_register());