diff options
author | Jerome Glisse <jglisse@redhat.com> | 2011-03-28 17:45:31 -0400 |
---|---|---|
committer | Jerome Glisse <jglisse@redhat.com> | 2011-03-30 17:03:00 -0400 |
commit | ebe304fa540f98d047382297f448fec692a67b8b (patch) | |
tree | 6b345b9880b3f2797b382fdd899e3147e418cb90 /src/gallium/auxiliary/draw/draw_llvm.h | |
parent | dcad6fb670ccc533167d1ae360833989c1eb4823 (diff) | |
download | external_mesa3d-ebe304fa540f98d047382297f448fec692a67b8b.zip external_mesa3d-ebe304fa540f98d047382297f448fec692a67b8b.tar.gz external_mesa3d-ebe304fa540f98d047382297f448fec692a67b8b.tar.bz2 |
gallium: list use inline function to avoid macro shot coming
Macro can lead to hard to debug list bugs. For instance consider
the following :
LIST_ADD(item, list->prev)
3 instruction of the macro became :
(list->prev)->next->prev = item
which is equivalent to :
list->prev = item
Thus list prev field changes and next instruction in the macro
(list->prev)->next = item
became :
item->next = item
And you endup with list corruption, other case lead to similar
list corruption. Inline function are not affected by this short
coming
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_llvm.h')
0 files changed, 0 insertions, 0 deletions