On Sun, Apr 17, 2011 at 5:31 AM, Teng-Feng Yang <[email protected]>wrote:

> Hi~
>
> Recently I have tried to parallelize some critical parts of MARSS.
> In order to synchronize threads, I need to use pthread_spinlock in
> statelist handling.
> I have included pthread.h in statelist.cpp, but the linker keeps
> complaining about "undefined reference to 'pthread_spin_init' ".
> I know I have to link the pthread library with -lpthread option, but I
> don't know how to put this linking option into scons scripts (I have tried
> this for couple of days).
>
> Use the DRAM's suggestion, but put that in qemu/SConstruct because that
script builds the final binary and link flag will be used there only.

The second question is, is it allowed to use volatile variable inside PTLsim
> part of MARSS?
> I have declared multiple volatile variable which leads to many "multiple
> definition of (volatile variable). first defined in ptlhwdef.cpp" errors.
> I double checked ptlhwdef.cpp, and I am sure that there is no variables
> mentioned in the error messages defined in there.
>
>
About second question, can you post the error message? As far as I know
volatile variables should work.

Also thanks for the efforts to parallelize Marss using pthreads. Please let
us know the result of your work.

Thanks,
Avadh

> Any help would be grateful!
>
> Dennis
>
>
> _______________________________________________
> http://www.marss86.org
> Marss86-Devel mailing list
> [email protected]
> https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel
>
>
_______________________________________________
http://www.marss86.org
Marss86-Devel mailing list
[email protected]
https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel

Reply via email to