Intel® ISA Extensions
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
1135 Discussions

Loops inside transactional regions in RTM (TSX)

jsg
Beginner
800 Views

Hi everyone,

I have a question about loops in TSX. Can I put loops inside a transactional region?

Example

xbegin();

...

   while(cond) i++;

..

xend();

Thank you very much,

0 Kudos
2 Replies
AdyT_Intel
Moderator
800 Views

Yes, you can put conditional code and loops inside a transaction.

0 Kudos
jimdempseyatthecove
Honored Contributor III
800 Views

I might add, if you use temporary variables, initialize them prior to entering the transaction, and then re-initialize them to same value before exit of transaction. The elison functionality will then void all writes to the temporary variable (inside the transaction).

Jim Dempsey

0 Kudos
Reply