From 4d598c650a430fa16af5cfd9202d63931823b547 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Tue, 17 Nov 2009 23:41:31 +0100 Subject: Document is_return(), module_name() and stp_pid() context tapset functions. --- tapset/context.stp | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) (limited to 'tapset/context.stp') diff --git a/tapset/context.stp b/tapset/context.stp index 14128589..36701e6e 100644 --- a/tapset/context.stp +++ b/tapset/context.stp @@ -210,7 +210,12 @@ function user_mode:long () %{ /* pure */ /* unprivileged */ } %} - +/** + * sfunction is_return - Whether the current probe context is a return probe. + * + * Description: Returns 1 if the current probe context is a return probe, + * returns 0 otherwise. + */ function is_return:long () %{ /* pure */ if (CONTEXT->pi) THIS->__retvalue = 1; @@ -225,24 +230,22 @@ function target:long () %{ /* pure */ /* unprivileged */ THIS->__retvalue = _stp_target; %} -/// -/// module_name:string() -/// module_name -/// -/// FIXME: need description. -/// -/// +/** + * sfunction module_name - The module name of the current script. + * + * Returns the name of the stap module. Either generated randomly + * (stap_[0-9a-f]+_[0-9a-f]+) or set by stap -m . + */ function module_name:string () %{ /* pure */ /* unprivileged */ strlcpy(THIS->__retvalue, THIS_MODULE->name, MAXSTRINGLEN); %} -/// -/// stp_pid:long() -/// stp_pid -/// -/// FIXME: need description. -/// -/// +/** + * sfunction stp_pid - The process id of the stapio process. + * + * Returns the process id of the stapio process that launched + * this script. + */ function stp_pid:long () %{ /* pure */ THIS->__retvalue = _stp_pid; %} -- cgit