|
Server : Apache System : Linux server.mata-lashes.com 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64 User : matalashes ( 1004) PHP Version : 8.1.29 Disable Function : NONE Directory : /usr/share/systemtap/tapset/ |
Upload File : |
/**
* sfunction randint - Return a random number between [0,n)
* @n: Number past upper limit of range, not larger than 2**20.
*/
function randint:long(n:long)
%{ /* unprivileged */
#define RANDMAX (1024*1024)
if ((unsigned long)STAP_ARG_n > RANDMAX)
CONTEXT->last_error = "range too wide";
else {
STAP_RETVALUE = (uint64_t) _stp_random_u((unsigned long) STAP_ARG_n);
}
#undef RANDMAX
%}