Sign In

Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Visitor
superfriend
Posts: 4
Registered: ‎11-29-2011
0

Microblaze: pthread_setaffinity_np and __sync_fetch_and_add_4

Hi all, 

 

I am cross compiling a software for MicroBlaze, but I received the following errors: 

1. pthread_setaffinity_np 

orocos_toolchain/rtt/rtt/os/gnulinux/fosi_internal.cpp: In function 'int RTT::os::rtos_task_set_cpu_affinity(RTOS_TASK*, unsigned int)':
orocos_toolchain/rtt/rtt/os/gnulinux/fosi_internal.cpp:359: error: 'pthread_setaffinity_np' was not declared in this scope
orocos_toolchain/rtt/rtt/os/gnulinux/fosi_internal.cpp: In function 'unsigned int RTT::os::rtos_task_get_cpu_affinity(const RTOS_TASK*)':
orocos_toolchain/rtt/rtt/os/gnulinux/fosi_internal.cpp:369: error: 'pthread_getaffinity_np' was not declared in this scope
make[2]: *** [rtt/CMakeFiles/orocos-rtt-gnulinux_dynamic.dir/os/gnulinux/fosi_internal.cpp.o] Error 1

I checked the toolchain libraries, pthread_setaffinity_np is supported by powerpc but not microblaze

I am wondering if it is possible to make microblaze supporting pthread_setaffinity_np ?

 

2. __sync_fetch_and_add_4

Another error I received is from Boost 1.45, which is needed by the software in 1. 

usr/include/boost/smart_ptr/detail/sp_counted_base_sync.hpp:48: undefined reference to `__sync_fetch_and_add_4'

 

Could someone help me please? Thank you! 

 

 

Visitor
mikertetc
Posts: 2
Registered: ‎05-08-2012
0

Re: Microblaze: pthread_setaffinity_np and __sync_fetch_and_add_4

I am seeing the same __sync_fetch_and_add_4 link eror with Boost 1.49.

 

Has anyone found a solution to this issue?

 

Thanks

Super Contributor
joy1887
Posts: 153
Registered: ‎03-31-2011
0

Re: Microblaze: pthread_setaffinity_np and __sync_fetch_and_add_4

can u post ur source code
Visitor
schweitz.lyric
Posts: 2
Registered: ‎06-22-2012
0

Re: Microblaze: pthread_setaffinity_np and __sync_fetch_and_add_4

file and build script attached, 

 

tx

 

Andy