libitm: Don't execute memtransfer/memset if size isn't larger than zero.

libitm/
	* dispatch.h (CREATE_DISPATCH_METHODS_MEM): Don't execute
	memtransfer/memset if size isn't larger than zero.

From-SVN: r184941
This commit is contained in:
Torvald Riegel 2012-03-05 16:34:12 +00:00 committed by Torvald Riegel
parent 034209bc2f
commit d28b0b0861
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2012-03-05 Torvald Riegel <triegel@redhat.com>
* dispatch.h (CREATE_DISPATCH_METHODS_MEM): Don't execute
memtransfer/memset if size isn't larger than zero.
2012-03-02 Torvald Riegel <triegel@redhat.com>
* libitm.texi: Link to specification and add a usage example.

View File

@ -102,11 +102,13 @@
virtual void memtransfer(void *dst, const void* src, size_t size, \
bool may_overlap, ls_modifier dst_mod, ls_modifier src_mod) \
{ \
memtransfer_static(dst, src, size, may_overlap, dst_mod, src_mod); \
if (size > 0) \
memtransfer_static(dst, src, size, may_overlap, dst_mod, src_mod); \
} \
virtual void memset(void *dst, int c, size_t size, ls_modifier mod) \
{ \
memset_static(dst, c, size, mod); \
if (size > 0) \
memset_static(dst, c, size, mod); \
}
#define CREATE_DISPATCH_METHODS_MEM_PV() \