On Sun, Apr 17, 2011 at 8: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). > The simplest option is to add: env.Append(LINKFLAGS='-lpthread') to qemu/SConstruct You'll see a bunch of statements like that floating around, just put them somewhere that's not in an if statement. I would then compile with scons pretty=0 to make sure that the linker flag made it. No idea about your second question though. > > 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. > > 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
