[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Parallella Community • View topic - Using the e_mutex

Using the e_mutex

Discussion about Parallella (and Epiphany) Software Development

Moderators: amylaar, jeremybennett, simoncook

Using the e_mutex

Postby Alec » Thu Jun 20, 2013 7:31 pm

Alec
 
Posts: 4
Joined: Thu Jun 20, 2013 7:15 pm

Re: Using the e_mutex

Postby ysapir » Thu Jun 20, 2013 7:58 pm

"section_core" is a section name created for the matmul example, and can be found in its provided LDF. It is not defined (and thus, being ignored) when linking using the standard LDF files provided in the BSP's.
User avatar
ysapir
 
Posts: 393
Joined: Tue Dec 11, 2012 7:05 pm

Re: Using the e_mutex

Postby Alec » Thu Jun 20, 2013 8:33 pm

Alec
 
Posts: 4
Joined: Thu Jun 20, 2013 7:15 pm

Re: Using the e_mutex

Postby ysapir » Thu Jun 20, 2013 8:52 pm

Could you please post an SSCCE (*)? It is hard to tell what the host is seeing and what you regard as a deadlock.


(*)
User avatar
ysapir
 
Posts: 393
Joined: Tue Dec 11, 2012 7:05 pm

Re: Using the e_mutex

Postby aolofsson » Thu Jun 20, 2013 8:53 pm

Alec,

Note that the address used in the mutex must be a global 32 bit address (even if you are using a mutex location that is within the core you are currently running the program from). 0x0002000 won't work so and using the local memory sections .data_bank0 won't work. The address should be of the format 0x8242000. We will consider a change for the upcoming e-lib API release that will make this more intuitive. The beauty of open source is that we can also show the source code of the function to try to explain what's going on :D

https://github.com/adapteva/epiphany-li ... tex_lock.s

Andreas
User avatar
aolofsson
 
Posts: 1005
Joined: Tue Dec 11, 2012 6:59 pm
Location: Lexington, Massachusetts,USA

Re: Using the e_mutex

Postby Alec » Fri Jun 21, 2013 7:01 pm

Thanks aolofsson, that removed my deadlock issue. I used e_address_from_coreid() to convert from a local address to a global one, and now the program runs to completion. However, it doesn't seem to be getting mutual exclusion. Attached is a .zip file containing my code and build/run scripts. Correct output should be "Final counter value: 16" but when I run it I get "Final counter value: 1". If I change the mutex's SECTION annotation to ".data_bank0", I get the error I posted a few posts above.
Attachments
sync.zip
(2.2 KiB) Downloaded 1353 times
Alec
 
Posts: 4
Joined: Thu Jun 20, 2013 7:15 pm

Re: Using the e_mutex

Postby ysapir » Fri Jun 21, 2013 11:44 pm

User avatar
ysapir
 
Posts: 393
Joined: Tue Dec 11, 2012 7:05 pm

Re: Using the e_mutex

Postby Alec » Sat Jun 22, 2013 2:55 am

Ah. Yes, yes it should. I thought I'd reverted that after one of my attempts to get the e_mutex_t to work. It works now, though, thank you and aolofsson very much for your help!

Actually, two quick questions: Why would this not compile if I choose to place the mutex in data bank 0? Is it because it overlaps with other local data that the program needs (as the compile error seems to imply)? Is it best just to never place things into data bank 0?
Alec
 
Posts: 4
Joined: Thu Jun 20, 2013 7:15 pm

Re: Using the e_mutex

Postby ysapir » Sat Jun 22, 2013 1:27 pm

There is a problem with LDF(s). Trying to locate data objects on ".data_bank0" creates a contention with the placement on the program code, which is put there as well. The problem is known and hopefully there will be a solution for that soon.
User avatar
ysapir
 
Posts: 393
Joined: Tue Dec 11, 2012 7:05 pm


Return to Programming Q & A

Who is online

Users browsing this forum: No registered users and 6 guests