C++ code adapted to the kernel v3.8