How to use tflowmeter in talend open

How to use RDRAND intrinsics?

If you look at (mine is in `/usr/lib/gcc/x86_64-linux-gnu/4.9/include/ ', Ubuntu 15.04 64bit), there are compatible (with MSVC, Intel CC) functions defined which pass data back to GCC built-ins

for 64bit parameters and two others for 16 bit and 32bit parameters

You supposed to use those so your code would be compatible with MSVC, Intel CC and other compilers.

will fill 64-bit parameters, passed by pointer, with random bits and return error code. Ditto for 32bit and 16bit versions


"These intrinsics generate random numbers of 16/32/64 bit wide random integers. The generated random value is written to the given memory location and the success status is returned: '1' if the hardware returned a valid random value, and '0 'otherwise. "


Per @ vy32 request, this is working for me. Well, my system gt updated since the original answer, so now it is Ubuntu 20.04.1, x64, GCC v9.3, compilation flags


Concerning CF flag and "Ignoring this is a common implementation error that does not show up in testing, but does show up when you run the DRNG under load", I believe this is what built-in is doing. If you comment out printf and compile to assembler with -S flag, code will look like,

which means that is zeroed, is set to 1 and then via might be set to 0 if CF is raised. And this value is returned from function.

So I believe built-in is already dealing with carry flag in a proper way, and user should just check output of as described in manual.