Home » Developing U++ » U++ Developers corner » Porting U++ to Blackfin DSP
Re: Porting U++ to Blackfin DSP [message #22550 is a reply to message #22334] |
Sun, 26 July 2009 17:19   |
 |
mirek
Messages: 14255 Registered: November 2005
|
Ultimate Member |
|
|
kohait00 wrote on Sat, 04 July 2009 18:30 | Ok, Mirek,
done!!!, so far... testing needed, anyway, but i will do that soon.
down there is the source files archive, containing the changed sources against tonight's revision state, so normally just relplacing would do.
i tryed to stick to the rules i could see in code everywhere.
there are 10 files to be replaced in Core
it compiles well using GCC normal build mode AND it compiles well using the "BF537.bm" build method, which contains paths to mi local build root and tool chain.
the __thread problem was solved in that way:
Random.cpp: so far no need to initialize a random seed per thread, in BF we could live with that 
in Mt.cpp: to indicate the per thread sMain as true, i placed the thread ids returned by pthread_self() in a static Index<pthread_t>, and later figured out, whaether the thread id is in there..BUG sourece!!! the Index cant shrink, no possibility to have a thread remove oneself's id from that Index, it will grow and grow with threads changing over time. but its a first shot
hope you can use it. i'll do 
there is also a small test project, somehow i cant add it as second attachment, comes down there
UPDATE / BUGFIX: added the forgotten Mutex and made the static Index<pthread_t> remove thread ids in ~Thread
|
Minor comments:
Maybe the handling of IsMain in Mt.cpp is way to complex. Maybe we could rather store somehow main thread id into some global variable and compare with actual thread id?
Perhaps in Random.cpp, there should be a mutex in blackfin version to protect random generator?
Anyway, patch applied. Thank you for contributing!
Mirek
|
|
|
Goto Forum:
Current Time: Tue Apr 29 01:53:24 CEST 2025
Total time taken to generate the page: 0.01055 seconds
|