Sindbad~EG File Manager

Current Path : /proc/2508182/root/usr/share/systemtap/tapset/dyninst/
Upload File :
Current File : //proc/2508182/root/usr/share/systemtap/tapset/dyninst/endian.stp

// NB: functionally equivalent to linux/endian.stp

%{
#include <endian.h>
%}

function big_endian2:long (val:long) %{ /* pure */
	STAP_RETVALUE = htobe16((uint16_t)STAP_ARG_val);
%}

function big_endian4:long (val:long) %{ /* pure */
	STAP_RETVALUE = htobe32((uint32_t)STAP_ARG_val);
%}

function big_endian8:long (val:long) %{ /* pure */
	STAP_RETVALUE = htobe64((uint64_t)STAP_ARG_val);
%}

function little_endian2:long (val:long) %{ /* pure */
	STAP_RETVALUE = htole16((uint16_t)STAP_ARG_val);
%}

function little_endian4:long (val:long) %{ /* pure */
	STAP_RETVALUE = htole32((uint32_t)STAP_ARG_val);
%}

function little_endian8:long (val:long) %{ /* pure */
	STAP_RETVALUE = htole64((uint64_t)STAP_ARG_val);
%}

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists