__tm_retry (ICC Prototype STM support)

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

8470 users have contributed to 31601 threads and 100646 posts to date.
In the past 24 hours, we have 30 new thread(s) 113 new posts(s), and 159 new user(s).

In the past 3 days, the most popular thread for everyone has been gemm(A,A,A) like possible? The most posts were made to gemm(A,A,A) like possible? The post with the most views is Dear Steve, excuse me for a d

Please welcome our newest member kopernikus