Hi Mahesh,

The problem is exactly what the fatal says: the sys_clone syscall
implementation assumes there is one thread context per process. You need to
either modify this implementation to understand your coprocessor or add a
thread context for the coprocessor in the config script.

See createThreads() in src/cpu/BaseCPU.py.

Jason

On Tue, Dec 13, 2016 at 4:16 PM Mahesh Balasubramanian <[email protected]>
wrote:

> Hi everybody,
>
> I have  built my own ARM CPU in gem5 atomic, which works like a
> coprocessor. Whenever there is a pthread_create call, that function runs on
> mycpu and after pthread_join the progran executes on the main cpu.
>
> I am trying out multiple pthread_create-pthread_join pairs (2 pairs to
> start with) for the only one function. When I compile my program using
> -lpthread flag the program runs fine for the first create-join pair, but
> when when it comes to second pthread_create, I get "*fatal: Called
> sys_clone, but no unallocated thread contexts found!" *message.
>
> So then I compile my program by linking pthread.o from m5threads and ran
> it. Now, in the first pthread_create my program does not exit and is stuck
> (freezes with a blinking cursor) after executing mycpu, meaning it is not
> exiting properly from mycpu.
>
> Surprisingly, I do not get any error when I run a function with hello
> world. It runs perfectly when I use pthread.o to link.
>
> It would be great if someone could guide me in this problem.
>
> Best,
> Mahesh
>
> _______________________________________________
> gem5-users mailing list
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

-- 

Jason
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to