Forum Jump

Select Group :
Select Forum :
Sorted By :
Sort Order :
From The :
 
Thread Tools  Search this thread 
Robert Mullins
Total Points:
40
Registered User
July 7, 2009 7:21 AM PDT
__tm_retry (ICC Prototype STM support)
Is there a public document that describes the STM API in detail? is "__tm_retry" part of the API? If so, what is its behaviour precisely? Many thanks for any help.
Ravi Narayanaswamy (Intel)
Total Points:
852
Status Points:
352
Brown Belt
July 8, 2009 5:00 PM PDT
Rate
 
#1
Quoting - Robert Mullins
Is there a public document that describes the STM API in detail? is "__tm_retry" part of the API? If so, what is its behaviour precisely? Many thanks for any help.

__tm_retry is provided as an experimental language extension support in the compiler.  __tm_retry aborts the current transaction including all the outer transaction enclosing this transaction and retries the transaction starting from the outermost transaction.

Robert Mullins
Total Points:
40
Registered User
July 9, 2009 2:28 AM PDT
Rate
 
#2 Reply to #1

__tm_retry is provided as an experimental language extension support in the compiler.  __tm_retry aborts the current transaction including all the outer transaction enclosing this transaction and retries the transaction starting from the outermost transaction.
Many thanks for your reply Ravi. 

I assume from the behaviour of the code below that __tm_retry simply spins rather than waiting for a change in the object state? Is there a simple way around this?

__attribute__((tm_callable))
void Queue::enq (int v) {

__tm_atomic {
// queue is full
if (count==MAX_LEN) __tm_retry;
buf[tail]=v;
if (++tail == MAX_LEN) tail=0;
count++;
}
//  cout << "enq" << endl;
}



Ravi Narayanaswamy (Intel)
Total Points:
852
Status Points:
352
Brown Belt
July 9, 2009 10:28 AM PDT
Rate
 
#3 Reply to #2
Quoting - Robert Mullins
Many thanks for your reply Ravi. 

I assume from the behaviour of the code below that __tm_retry simply spins rather than waiting for a change in the object state? Is there a simple way around this?

__attribute__((tm_callable))
void Queue::enq (int v) {

__tm_atomic {
// queue is full
if (count==MAX_LEN) __tm_retry;
buf[tail]=v;
if (++tail == MAX_LEN) tail=0;
count++;
}
//  cout << "enq" << endl;
}


__tm_retry was provided as an experimental hoping to get user feedback on the use case for this language extension.  So not much time was spend on an optimal implementation.



Intel Software Network Forums Statistics

8286 users have contributed to 31232 threads and 99107 posts to date.
In the past 24 hours, we have 7 new thread(s) 27 new posts(s), and 36 new user(s).

In the past 3 days, the most popular thread for everyone has been comparison cilk++, openmp, pthreads first results The most posts were made to comparison cilk++, openmp, pthreads first results The post with the most views is Very amusing...  Escalated as

Please welcome our newest member titanius.anglesmith