From 78e51a8c6678b6e3dff3d619aa786669f531f4bc Mon Sep 17 00:00:00 2001 From: rsc Date: Fri, 14 Jan 2005 03:45:44 +0000 Subject: checkpoint --- man/man3/getcallerpc.html | 99 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 man/man3/getcallerpc.html (limited to 'man/man3/getcallerpc.html') diff --git a/man/man3/getcallerpc.html b/man/man3/getcallerpc.html new file mode 100644 index 00000000..72a835d1 --- /dev/null +++ b/man/man3/getcallerpc.html @@ -0,0 +1,99 @@ + +getcallerpc(3) - Plan 9 from User Space + + + + +
+
+
GETCALLERPC(3)GETCALLERPC(3) +
+
+

NAME
+ +
+ + getcallerpc – fetch return PC of current function
+ +
+

SYNOPSIS
+ +
+ + #include <u.h>
+ #include <libc.h> +
+
+ ulong getcallerpc(void *firstarg)
+
+
+

DESCRIPTION
+ +
+ + Getcallerpc is a portable way to discover the PC to which the + current function will return. Firstarg should be a pointer to + the first argument to the function in question.
+ +
+

EXAMPLE
+ +
+ + +
+ + void
+ printpc(ulong arg)
+ {
+ +
+ + print("Called from %.8lux\n", getcallerpc(&arg));
+ +
+ }
+ void
+ main(int argc, char *argv[])
+ {
+ +
+ + printpc(0);
+ printpc(0);
+ printpc(0);
+ +
+ }
+
+
+ +
+

SOURCE
+ +
+ + /usr/local/plan9/src/lib9/
+
+
+

BUGS
+ +
+ + The firstarg parameter should not be necessary.
+ +
+ +

+
+
+ + +
+
+
+Space Glenda +
+
+ + -- cgit v1.2.3