From 61df7c736e8d2388b4236b4eb8eaf32ab09d3cf7 Mon Sep 17 00:00:00 2001 From: fche Date: Wed, 9 Nov 2005 17:08:19 +0000 Subject: 2005-11-09 Frank Ch. Eigler Reported by Guang Lei Li : * tapset/context.stp (pid,ppid,tid): Correctly pick tgid vs pid. * testsuite/buildok/context_test.stp: Print out tid() too. --- tapset/context.stp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'tapset') diff --git a/tapset/context.stp b/tapset/context.stp index 81604d83..0075150d 100644 --- a/tapset/context.stp +++ b/tapset/context.stp @@ -40,14 +40,21 @@ function pid:long () %{ if (unlikely(in_interrupt())) THIS->__retvalue = 0; else - THIS->__retvalue = current->pid; + THIS->__retvalue = current->tgid; +%} + +function tid:long () %{ + if (unlikely(in_interrupt())) + THIS->__retvalue = 0; + else + THIS->__retvalue = current->pid; %} function ppid:long () %{ if (unlikely(in_interrupt() || !current->parent)) THIS->__retvalue = 0; else - THIS->__retvalue = current->parent->pid; + THIS->__retvalue = current->parent->tgid; %} function pexecname:string () %{ -- cgit