Re: [uClinux-dev] Context_thread hangs when startup for ARM uClinux 2.4.x

From: Jacky Lam (sylam@emsoftltd.com)
Date: Fri May 17 2002 - 03:08:03 EDT


Hi all,

    After searching for the whole mailing list archieve, I find that there
are quite a number of people having problem with kernel_thread before.
Generally, there are two solutions: Use compiler before 2.95.xx or using an
unofficial patch to kernel_thread. However, it seems the compiler before
2.95.xx cannot compile kernel 2.4 correctly and the patch for kernel_thread
is for 2.0.38 only. So, I have done several tests and post the results here.
Hopefully someone who have some clues can help me. Thx.

    As I have no problem to start init(), I insert my test code just before
spawning init(). The test code is :

    Test 1:

    ...
    kernel_thread(test_thread, NULL, ....);
    printk("Finish spawning test thread\n");
    kernel_thread(init, NULL,...);
    ...

    ...
    int test_thread(void *data)
    {
        printk("Test thread started\n");
        while(1);
    }

    I found that test_thread is started and run, but kernel_thread doesn't
exit. So, I do a second test.

    Test 2:

    ...
    kernel_thread(test_thread, NULL,...);
    printk("Finish spawning test thread\n");
    kernel_thread(init, NULL,...);
    ...

    ...
    int test2_thread(void *data)
    {
        printk("Test2 thread started\n");
    }

    int test_thread(void *data)
    {
        printk("Test thread started\n");
        kernel_thread(test2_thread, NULL,...);
    }

    The result is test_thread is run and "Finish spawning test tread" is
seen. But "Test2 thread started" is not seen. And after all of that, the
kernel hangs.

       If anyone has some ideas or suggestion, I will be very happy to try
with. Thx

Jacky
----- Original Message -----
From: "Jacky Lam" <sylam@emsoftltd.com>
To: <uclinux-dev@uclinux.org>
Sent: Friday, May 17, 2002 12:37 PM
Subject: [uClinux-dev] Context_thread hangs when startup


> Hi all,
>
> I am now managed to boot the kernel up to where it tries to spawn a kernel
> thread running context_thread. However, after entering kernel_thread(), it
> seems context_thread has not been called(as I can't see the printk I put
in
> the front of the function) and kernel_thread doesn't exit.
> There is no information dumping out and I have no idea about how to trace
> this problem. Could someone give any hint or possiblity of the problem?
> Thx.
>
> Jacky
> This message resent by the uclinux-dev@uclinux.org list server
http://www.uClinux.org/

This message resent by the uclinux-dev@uclinux.org list server http://www.uClinux.org/


This archive was generated by hypermail 2.1.4 : Thu Sep 19 2002 - 13:21:16 EDT