如果您无法下载资料,请参考说明:
1、部分资料下载需要金币,请确保您的账户上有足够的金币
2、已购买过的文档,再次下载不重复扣费
3、资料包下载后请先用软件解压,在使用对应软件打开
tinySTM使用:TinySTM初始化TinySTM线程初始化typedefstructstm_tx{/*Transactiondescriptor*/stm_tx_attr_t*attr;/*Transactionattributes(user-specified)*/stm_word_tstatus;/*Transactionstatus(notreadbyotherthreads)*/stm_word_tstart;/*Starttimestamp*/stm_word_tend;/*Endtimestamp(validityrange)*/r_set_tr_set;/*Readset*/w_set_tw_set;/*Writeset*/sigjmp_bufenv;/*Environmentforsetjmp/longjmp*/sigjmp_buf*jmp;/*Pointertoenvironment(NULLwhennotusingsetjmp/longjmp)*/intnesting;/*Nestinglevel*/intro;/*Isthisexecutionread-only?*/intcan_extend;/*Canthistransactionbeextended?*/void*data[MAX_SPECIFIC];/*Transaction-specificdata(fixed-sizearrayforbetterspeed)*/#ifdefCONFLICT_TRACKINGpthread_tthread_id;/*Threadidentifier(immutable)*/#endif/*CONFLICT_TRACKING*/#ifCM==CM_DELAY||CM==CM_PRIORITYvolatilestm_word_t*c_lock;/*Pointertocontentedlock(causeofabort)*/#endif/*CM==CM_DELAY||CM==CM_PRIORITY*/#ifCM==CM_BACKOFFunsignedlongbackoff;/*Maximumbackoffduration*/unsignedlongseed;/*RNGseed*/#endif/*CM==CM_BACKOFF*/#ifDESIGN==WRITE_BACK_ETLunsignedlongaborts_reallocate;/*Abortsduetowritesetreallocation(cumulative)*/#endif/*DESIGN==WRITE_BACK_ETL*/#ifdefROLLOVER_CLOCKunsignedlongaborts_rollover;/*Abortsduetoclockrollingover(cumulative)*/#endif/*ROLLOVER_CLOCK*/#ifdefREAD_LOCKED_DATAunsignedlonglocked_reads_ok;/*Successfulreadsofpreviousvalue*/unsignedlonglocked_reads_failed;/*Failedreadsofpreviousvalue*/#endif/*READ_LOCKED_DATA*/unsignedlongmax_retries;/*Maximumnumberofconsecutiveaborts(retries)*/#endif/*INTERNAL_STATS*/}TinySTM读取内存TinySTM写内存(stm_write)TinySTM提交(stm_commit)TinySTM退出(stm_exit)