Used GCC inline function to realise a closure.