MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /usr/share/systemtap/tapset/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/systemtap/tapset/endian.stp
# set the default endianess for binary printf
# val:   0 - native (default)
#        1 - little endian
#        2 - big endian
function set_endian:long (val:long) %{
	_stp_endian = THIS->val;	
%}

function big_endian2:long (val:long) %{ /* pure */
	THIS->__retvalue = cpu_to_be16(THIS->val);
%}

function big_endian4:long (val:long) %{ /* pure */
	THIS->__retvalue = cpu_to_be32(THIS->val);
%}

function big_endian8:long (val:long) %{ /* pure */
	THIS->__retvalue = cpu_to_be64(THIS->val);
%}

function little_endian2:long (val:long) %{ /* pure */
	THIS->__retvalue = cpu_to_le16(THIS->val);
%}

function little_endian4:long (val:long) %{ /* pure */
	THIS->__retvalue = cpu_to_le32(THIS->val);
%}

function little_endian8:long (val:long) %{ /* pure */
	THIS->__retvalue = cpu_to_le64(THIS->val);
%}

Anon7 - 2021