P
US8522223B2ActiveUtilityPatentIndex 83

Automatic function call in multithreaded application

Assignee: WANG CHENGPriority: Nov 22, 2006Filed: Nov 22, 2006Granted: Aug 27, 2013
Est. expiryNov 22, 2026(~0.4 yrs left)· nominal 20-yr term from priority
Inventors:WANG CHENGWU YOUFENGCHEN WEI-YUYING ZHIWEI
G06F 9/466G06F 8/41
83
PatentIndex Score
8
Cited by
26
References
11
Claims

Abstract

In general, in one aspect, the disclosure describes a method to detect a transaction and direct non transactional memory (TM) user functions within the transaction. The non TM user functions are treated as TM functions and added to the TM list.

Claims

exact text as granted — not AI-modified
What is claimed: 
     
       1. A method implemented by a transactional memory (TM) compiler, the method comprising
 recognizing a function declared as being TM compatible by a programmer within a parallel programming application; 
 automatically creating a TM version of the function declared as being TM compatible by:
 adding static code to check for concurrency conflict detection and transaction rollback; 
 automatically storing an address of the TM version of the function a fixed offset from the location of the function declared as being TM compatible; 
 automatically adding a call to an empty function at the beginning of the function declared as being TM compatible that has a TM version; and 
 automatically adding static code for a pointer utilized within the TM version of the function to check whether a function pointed to includes a call to the empty function, and at runtime:
 if the function pointed to includes the call to the empty function, calling a function at an address stored the fixed offset from the function pointed to; or 
 if the function pointed to does not include a call to the empty function, calling a translate function that will translate the function pointed to into a TM version thereof at runtime. 
 
 
 
     
     
       2. The method of  claim 1 , further comprising automatically adding static code for a pointer utilized outside of the transaction to check whether the function pointed to has a TM version by determining if the function pointed to includes the call to the empty function and routing calls based thereon. 
     
     
       3. The method of  claim 2 , wherein the added static code checks whether a function pointed to includes a call to the empty function, and at runtime if the function pointed to includes the call to the empty function, skipping the call to the empty function. 
     
     
       4. The method of  claim 1 , wherein the recognizing a function declared as being TM compatible includes recognizing a specific command. 
     
     
       5. The method of  claim 1 , further comprising recognizing a transaction declared by the programmer within the parallel programming application, wherein the recognizing a transaction includes recognizing a specific command. 
     
     
       6. An transactional memory (TM) compiler to:
 recognize a function declared as being TM compatible by a programmer within a parallel programming application; 
 automatically create a TM version of the function declared as being TM compatible by:
 adding static code to check for concurrency conflict detection and transaction rollback; 
 automatically store, in a memory, an address of the TM version of a function a fixed offset from the location of the function declared as being TM compatible; 
 automatically add a call to an empty function at the beginning of the function declared as being TM compatible that has a TM version; and 
 automatically adding static code for a pointer utilized within the TM version of the function to check whether a function pointed to includes a call to the empty function, and at runtime:
 if the function pointed to includes the call to the empty function, calling a function at an address stored the fixed offset from the function pointed to; or 
 if the function pointed to does not include a call to the empty function, calling a translate function that will translate the function pointed to into a TM version thereof at runtime. 
 
 
 
     
     
       7. The TM compiler of  claim 6  that is further to add static code for a pointer utilized outside of the transaction to check whether the function pointed to has a TM version by determining if the function pointed to includes the call to the empty function and routing calls based thereon. 
     
     
       8. The unmanaged language TM compiler of  claim 7 , wherein the added static code checks whether a function pointed to includes a call to the empty function, and at runtime if the function pointed to includes the call to the empty function, skipping the call to the empty function. 
     
     
       9. A system comprising
 a multicore processor; 
 memory coupled to the processor to store a parallel programming application, the application when executed causing the processor to perform certain functions in parallel threads; and 
 a transactional memory (TM) compiler to:
 recognize a function declared as being TM compatible by a programmer within a parallel programming application; 
 automatically create a TM version of the function declared as being TM compatible by:
 adding static code to check for concurrency conflict detection and transaction rollback; 
 automatically store an address of the TM version of the function declared as being TM compatible a fixed offset from the location of the function declared as being TM compatible; 
 automatically add a call to an empty function at the beginning of the function declared as begin TM compatible that has a TM version; and 
 
 automatically adding static code for a pointer utilized within the TM version of the function to check whether a function pointed to includes a call to the empty function, and at runtime:
 if the function pointed to includes the call to the empty function, calling a function at an address stored the fixed offset from the function pointed to; or 
 if the function pointed to does not include a call to the empty function, calling a translate function that will translate the function pointed to into a TM version thereof at runtime. 
 
 
 
     
     
       10. The system of  claim 9 , wherein the TM compiler is further to add static code for a pointer utilized outside of the transaction to check whether the function pointed to has a TM version by determining if the function pointed to includes the call to the empty function and routing calls based thereon. 
     
     
       11. The system of  claim 10 , wherein the added static code checks whether a function pointed to includes a call to the empty function, and at runtime if the function pointed to includes the call to the empty function, skipping the call to the empty function.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.